當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ClassType::getMethods方法代碼示例

本文整理匯總了PHP中Nette\PhpGenerator\ClassType::getMethods方法的典型用法代碼示例。如果您正苦於以下問題:PHP ClassType::getMethods方法的具體用法?PHP ClassType::getMethods怎麽用?PHP ClassType::getMethods使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Nette\PhpGenerator\ClassType的用法示例。


在下文中一共展示了ClassType::getMethods方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: afterCompile

 public function afterCompile(Nette\PhpGenerator\ClassType $class)
 {
     $methods = $class->getMethods();
     $init = $methods['initialize'];
     $init->addBody('vojtabiberle\\MediaStorage\\Bridges\\Nette\\Forms\\Controls\\SingleSelectFileChoicer::register();');
     $init->addBody('vojtabiberle\\MediaStorage\\Bridges\\Nette\\Forms\\Controls\\MultiSelectFileChoicer::register();');
 }
開發者ID:vojtabiberle,項目名稱:MediaStorage,代碼行數:7,代碼來源:Extension.php

示例2: afterCompile

 public function afterCompile(Nette\PhpGenerator\ClassType $class)
 {
     $init = $class->getMethods()['initialize'];
     $config = $this->validateConfig($this->defaults);
     if ($config['paginatorTemplate']) {
         $init->addBody('?::$defaultPaginationTemplate = ?;', [Settings::class, $config['paginatorTemplate']]);
     }
 }
開發者ID:WebChemistry,項目名稱:filter,代碼行數:8,代碼來源:FilterExtension.php

示例3: afterCompile

 /**
  * @param Nette\PhpGenerator\ClassType $class
  */
 public function afterCompile(Nette\PhpGenerator\ClassType $class)
 {
     $methods = $class->getMethods();
     $init = $methods['initialize'];
     if ($this->getContainerBuilder()->hasDefinition($this->prefix('bar'))) {
         $init->addBody('if ($this->parameters["debugMode"]) Tracy\\Debugger::getBar()->addPanel($this->getService(?));', [$this->prefix('bar')]);
     }
 }
開發者ID:webchemistry,項目名稱:parameters,代碼行數:11,代碼來源:ParametersExtension.php

示例4: afterCompile

 public function afterCompile(ClassType $class)
 {
     $config = $this->validateConfig($this->defaults);
     $methods = $class->getMethods();
     $initialize = $methods['initialize'];
     $initialize->addBody(TextOutput::class . '::register();');
     $initialize->addBody(DatePicker::class . '::register();');
     $initialize->addBody(DateTimePicker::class . '::register();');
     $initialize->addBody(TagControl::class . '::register();');
     $this->registerSelectBox($initialize, $config['country'], "addSelectCountry", $this->countryCodes);
     $this->registerSelectBox($initialize, $config['locale'], "addSelectLocale", $this->localeCodes);
 }
開發者ID:pipaslot,項目名稱:forms,代碼行數:12,代碼來源:FormExtensions.php

示例5: afterCompile

 /**
  * @param Nette\PhpGenerator\ClassType $class
  */
 public function afterCompile(Nette\PhpGenerator\ClassType $class)
 {
     $methods = $class->getMethods();
     $init = $methods['initialize'];
     $config = $this->getSettings();
     if ($config['registration']['upload'] && class_exists('Nette\\Forms\\Form')) {
         $init->addBody(Upload::class . '::register();');
     }
     if ($config['registration']['multiUpload'] && class_exists('Nette\\Forms\\Form')) {
         $init->addBody(MultiUpload::class . '::register();');
     }
     if ($config['checkbox']['caption']) {
         $init->addBody(Checkbox::class . '::$globalCaption = ?;', [$config['checkbox']['caption']]);
     }
 }
開發者ID:webchemistry,項目名稱:images,代碼行數:18,代碼來源:ImagesExtension.php

示例6: afterCompile

 public function afterCompile(Nette\PhpGenerator\ClassType $class)
 {
     $config = $this->validateConfig($this->defaults);
     $init = $class->getMethods()['initialize'];
     if ($config['recaptcha']['api']) {
         $init->addBody('WebChemistry\\Forms\\Controls\\Recaptcha::$defaultApiKey = ?;', [$config['recaptcha']['api']]);
     }
     if ($config['recaptcha']['secret']) {
         $init->addBody('WebChemistry\\Forms\\Controls\\Recaptcha::$defaultSecretKey = ?;', [$config['recaptcha']['secret']]);
     }
     if ($config['date']['format']) {
         $init->addBody('WebChemistry\\Forms\\Controls\\Date::$dateFormat = ?;', [$config['date']['format']]);
     }
     if ($config['translations']['enable']) {
         $tr = $config['translations'];
         $init->addBody('Nette\\Forms\\Validator::$messages[WebChemistry\\Forms\\Controls\\Date::VALID] = ?;', [$tr['date']]);
         $init->addBody('Nette\\Forms\\Validator::$messages[WebChemistry\\Forms\\Controls\\Mask::VALID] = ?;', [$tr['mask']]);
         $init->addBody('Nette\\Forms\\Validator::$messages[WebChemistry\\Forms\\Controls\\Recaptcha::VALID] = ?;', [$tr['recaptcha']['valid']]);
         $init->addBody('Nette\\Forms\\Validator::$messages[WebChemistry\\Forms\\Controls\\Recaptcha::FILLED] = ?;', [$tr['recaptcha']['filled']]);
         $init->addBody('Nette\\Forms\\Validator::$messages[WebChemistry\\Forms\\Controls\\Tags::PLACEHOLDER] = ?;', [$tr['tags']]);
     }
 }
開發者ID:webchemistry,項目名稱:forms-controls,代碼行數:22,代碼來源:FormControlsExtension.php

示例7: afterCompile

 public function afterCompile(Nette\PhpGenerator\ClassType $class)
 {
     $init = $class->getMethods()['initialize'];
     $config = $this->validateConfig($this->defaults);
     $init->addBody('WebChemistry\\Forms\\Controls\\Multiplier::register(?);', [$config['name']]);
 }
開發者ID:webchemistry,項目名稱:forms-multiplier,代碼行數:6,代碼來源:MultiplierExtension.php

示例8: afterCompile

 public function afterCompile(ClassType $class)
 {
     $init = $class->getMethods()['initialize'];
     $init->addBody(__CLASS__ . '::registerControls();');
 }
開發者ID:nextras,項目名稱:forms,代碼行數:5,代碼來源:FormsExtension.php

示例9: afterCompile

 public function afterCompile(Nette\PhpGenerator\ClassType $class)
 {
     $methods = $class->getMethods();
     $methods['initialize']->addBody('$this->getByType(?)->register(?);', [Manager::class, $this->config['prepend']]);
 }
開發者ID:ytnuk,項目名稱:alias,代碼行數:5,代碼來源:Extension.php


注:本文中的Nette\PhpGenerator\ClassType::getMethods方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。