本文整理汇总了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]);
}
示例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]);
}
示例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);
}
示例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()]);
}
示例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')]);
}
示例6: getReplacements
public function getReplacements()
{
return array_merge(parent::getReplacements(), ['abstract_repository' => $this->AbstractRepository(), 'interface' => $this->getInterface()]);
}
示例7: getReplacements
/**
* @return array
*/
public function getReplacements()
{
return array_merge(parent::getReplacements(), ['transformer' => $this->getOption('transformer') ?: parent::getRootNamespace() . 'Repositories\\Transformers\\' . $this->getName()]);
}
示例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']);
}
示例9: getReplacements
/**
* Get array replacements.
*
* @return array
*/
public function getReplacements()
{
return array_merge(parent::getReplacements(), ['repository' => $this->getRepository(), 'eloquent' => $this->getEloquentRepository(), 'placeholder' => $this->bindPlaceholder]);
}
示例10: getReplacements
/**
* Get array replacements.
*
* @return array
*/
public function getReplacements()
{
return array_merge(parent::getReplacements(), ['appnamespace' => $this->getAppNamespace()]);
}
示例11: getReplacements
/**
* Get array replacements.
*
* @return array
*/
public function getReplacements()
{
$modelGenerator = new ModelGenerator();
return array_merge(parent::getReplacements(), ['model_namespace' => $modelGenerator->getRootNamespace()]);
}
示例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')]);
}
示例13: getReplacements
/**
* Get array replacements.
*
* @return array
*/
public function getReplacements()
{
return array_merge(parent::getReplacements(), ['screenable' => $this->getScreenable()]);
}
示例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()]);
}
示例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()]);
}