当前位置: 首页>>代码示例>>PHP>>正文


PHP Generator::getReplacements方法代码示例

本文整理汇总了PHP中Generator::getReplacements方法的典型用法代码示例。如果您正苦于以下问题:PHP Generator::getReplacements方法的具体用法?PHP Generator::getReplacements怎么用?PHP Generator::getReplacements使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Generator的用法示例。


在下文中一共展示了Generator::getReplacements方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getReplacements

 /**
  * Get array replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     $modelGenerator = new ModelGenerator(['name' => $this->name]);
     $model = $modelGenerator->getRootNamespace() . '\\' . $modelGenerator->getName();
     $model = str_replace(["\\", '/'], '\\', $model);
     return array_merge(parent::getReplacements(), ['model' => $model]);
 }
开发者ID:eaglesistemas,项目名称:eaglerepository,代码行数:12,代码来源:TransformerGenerator.php

示例2: getReplacements

 /**
  * Get array replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     $transformerGenerator = new TransformerGenerator(['name' => $this->name]);
     $transformer = $transformerGenerator->getRootNamespace() . '\\' . $transformerGenerator->getName() . 'Transformer';
     $transformer = str_replace(["\\", '/'], '\\', $transformer);
     echo $transformer;
     return array_merge(parent::getReplacements(), ['transformer' => $transformer]);
 }
开发者ID:eaglesistemas,项目名称:eaglerepository,代码行数:13,代码来源:PresenterGenerator.php

示例3: getReplacements

 /**
  * Get template replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['extends' => $this->extends, 'section' => $this->section, 'content' => $this->content], $this->customReplacements);
 }
开发者ID:mayconbordin,项目名称:laragen,代码行数:9,代码来源:ViewGenerator.php

示例4: getReplacements

 /**
  * Get array replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['controller' => $this->getControllerName(), 'plural' => $this->getPluralName(), 'singular' => $this->getSingularName(), 'validator' => $this->getValidator(), 'repository' => $this->getRepository(), 'appname' => $this->getAppNamespace()]);
 }
开发者ID:someline,项目名称:starter-framework,代码行数:9,代码来源:ControllerGenerator.php

示例5: getReplacements

 /**
  * Get template replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['command' => $this->option('command', 'command:name'), 'description' => $this->option('description', 'Command description')]);
 }
开发者ID:Avantinternet,项目名称:generators,代码行数:9,代码来源:ConsoleGenerator.php

示例6: getReplacements

 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['abstract_repository' => $this->AbstractRepository(), 'interface' => $this->getInterface()]);
 }
开发者ID:sthWrong,项目名称:season5.co,代码行数:4,代码来源:RepositoryEloquentGenerator.php

示例7: getReplacements

 /**
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['transformer' => $this->getOption('transformer') ?: parent::getRootNamespace() . 'Repositories\\Transformers\\' . $this->getName()]);
 }
开发者ID:killtw,项目名称:repository,代码行数:7,代码来源:PresenterGenerator.php

示例8: getReplacements

 /**
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['model' => strpos('\\', $this->getOption('model')) != false ? $this->getOption('model') : $this->getModelNamespace() . $this->getOption('model'), 'presenter' => $this->getOption('presenter'), 'presenterClass' => $this->getOption('presenterClass') ?: 'null']);
 }
开发者ID:killtw,项目名称:repository,代码行数:7,代码来源:RepositoryGenerator.php

示例9: getReplacements

 /**
  * Get array replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['repository' => $this->getRepository(), 'eloquent' => $this->getEloquentRepository(), 'placeholder' => $this->bindPlaceholder]);
 }
开发者ID:eaglesistemas,项目名称:eaglerepository,代码行数:9,代码来源:BindingsGenerator.php

示例10: getReplacements

 /**
  * Get array replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['appnamespace' => $this->getAppNamespace()]);
 }
开发者ID:leloulight,项目名称:ProjectManager,代码行数:9,代码来源:PresenterGenerator.php

示例11: getReplacements

 /**
  * Get array replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     $modelGenerator = new ModelGenerator();
     return array_merge(parent::getReplacements(), ['model_namespace' => $modelGenerator->getRootNamespace()]);
 }
开发者ID:leloulight,项目名称:ProjectManager,代码行数:10,代码来源:TransformerGenerator.php

示例12: getReplacements

 /**
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['model' => strpos('\\', $this->getOption('model')) != false ? $this->getOption('model') : $this->getModelNamespace() . $this->getOption('model')]);
 }
开发者ID:killtw,项目名称:repository,代码行数:7,代码来源:TransformerGenerator.php

示例13: getReplacements

 /**
  * Get array replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['screenable' => $this->getScreenable()]);
 }
开发者ID:geehare,项目名称:laraval-screen,代码行数:9,代码来源:ScreenGenerator.php

示例14: getReplacements

 /**
  * Get array replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     return array_merge(parent::getReplacements(), ['validator' => $this->getValidator(), 'repository' => $this->getRepository(), 'namespace' => 'namespace ' . $this->getRootNamespace() . '\\' . $this->getName() . ';', 'appname' => $this->getAppNamespace(), 'managername' => $this->getManagerName()]);
 }
开发者ID:mammutgroup,项目名称:l5-repository,代码行数:9,代码来源:ManagerGenerator.php

示例15: getReplacements

 /**
  * Get array replacements.
  *
  * @return array
  */
 public function getReplacements()
 {
     $transformerGenerator = new TransformerGenerator(['name' => $this->name]);
     return array_merge(parent::getReplacements(), ['transformer_namespace' => $transformerGenerator->getNamespaceName()]);
 }
开发者ID:ptcong,项目名称:l5-repository,代码行数:10,代码来源:PresenterGenerator.php


注:本文中的Generator::getReplacements方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。