当前位置: 首页>>代码示例>>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;未经允许,请勿转载。