本文整理汇总了PHP中Generator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Generator::__construct方法的具体用法?PHP Generator::__construct怎么用?PHP Generator::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generator
的用法示例。
在下文中一共展示了Generator::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @see crudigniter/generator/Generator#__construct()
*/
public function __construct()
{
parent::__construct('Controller');
$this->validate();
$this->cache();
$this->profile();
}
示例2: __construct
public function __construct(ReportInterface $reportIfc, $repositoryName, $entityName, $service)
{
parent::__construct($reportIfc);
$this->repositoryName = $repositoryName;
$this->entityName = $entityName;
$this->service = $service;
}
示例3:
function __construct($lines, $columns, $options)
{
if (!isset($options['character'])) {
$options['character'] = '.';
}
parent::__construct($lines, $columns, $options);
}
示例4: __construct
public function __construct(ReportInterface $reportIfc, $name, $baseController, $routePrefix, $entityName, $repoService)
{
parent::__construct($reportIfc);
$this->name = $name;
$this->baseController = $baseController;
$this->routePrefix = $routePrefix;
$this->entityName = $entityName;
$this->repoService = $repoService;
}
示例5: __construct
/**
* ViewGenerator constructor.
*
* @param array $options [ extends=The name of view layout being used;
* section=The name of section being used;
* content=The view content;
* template=The path of view template;
* master=Create a master view;
* plain=Create a blank view ]
*/
public function __construct(array $options = array())
{
parent::__construct('view', $options);
$this->extends = array_get($options, 'extends', 'layouts.master');
$this->section = array_get($options, 'section', 'content');
$this->content = array_get($options, 'content', null);
$this->template = array_get($options, 'template', null);
$this->master = array_get($options, 'master', false);
$this->plain = array_get($options, 'plain', false);
}
示例6: __construct
/**
* Start the generation process.
*
* @return void
*/
public function __construct($args)
{
parent::__construct($args);
// we need a controller name
if ($this->lower == null) {
Common::error('You must specify a bundle name.');
}
// add the directory copy to the writer
$this->writer->copy_directory('Bundle', $this->lower, Bundle::path('bob') . 'templates/bundle', path('bundle') . $this->lower);
$this->writer->write();
}
示例7:
function __construct($lines, $columns, $options)
{
if (!$options) {
$options = [];
}
if (!isset($options['start_column'])) {
$options['start_column'] = 0;
}
if (!isset($options['character'])) {
$options['character'] = '\\';
}
parent::__construct($lines, $columns, $options);
}
示例8: __construct
/**
* Start the generation process.
*
* @return void
*/
public function __construct($args)
{
parent::__construct($args);
// we need a task name
if ($this->class == null) {
Common::error('You must specify a task name.');
}
// set switches
$this->_settings();
// start the generation
$this->_task_generation();
// write filesystem changes
$this->writer->write();
}
示例9: __construct
/**
* Start the generation process.
*
* @return void
*/
public function __construct($args)
{
parent::__construct($args);
// we need a controller name
if ($this->class == null) {
Common::error('You must specify a model name.');
}
// load any command line switches
$this->_settings();
// start the generation
$this->_model_generation();
// write filesystem changes
$this->writer->write();
}
示例10: __construct
/**
* Constants constructor.
*
* @param array $params
* @uses Constants::setFileName()
*/
public function __construct($params = array())
{
// set defaults
$defaults = array('directory' => PHP_DIR, 'file_name' => 'gen_constants.php', 'log_level' => Log::LOG_LEVEL_WARNING, 'log_directory' => LOG_DIR, 'log_file' => 'db_' . date('Y-m-d') . '.log', 'user' => '', 'pass' => '', 'host' => 'localhost', 'db' => '', 'dump_file' => '');
if (Helpers::is_array_ne($params)) {
if (array_key_exists('file_name', $params)) {
$this->setFileName($params['file_name']);
}
if (array_key_exists('table_name', $params) && Helpers::is_string_ne($params['table_name'])) {
$this->constant_table = $params['table_name'];
unset($params['table_name']);
}
} else {
$this->setFileName($params['file_name']);
}
// set up parameters
$params = array_merge($defaults, $params);
// initialize generator class
parent::__construct($params);
$this->Log->write('done constructing ' . __METHOD__, Log::LOG_LEVEL_SYSTEM_INFORMATION);
}
示例11: __construct
/**
*
* @param type $formRoute
* @param type $extraParams
* @param type $productVersion
*/
public function __construct($formRoute, $extraParams = array(), $productVersion = '')
{
parent::__construct($formRoute, $extraParams, $productVersion);
}
示例12:
function __construct()
{
parent::__construct();
$this->module_size = 4;
$this->quiet_zone = 4;
}
示例13: __construct
/**
* Constructor
*
* @see crudigniter/generator/Generator#__construct()
*/
public function __construct()
{
parent::__construct('View');
$this->listViews();
$this->hasValidation();
}
示例14: __construct
/**
* Constructor
*
* @see crudigniter/generator/Generator#__construct()
*/
public function __construct()
{
parent::__construct('Model');
}
示例15: __construct
/**
* SeedGenerator constructor.
*
* @param array $options [ master=Create a master seed ]
*/
public function __construct(array $options = array())
{
parent::__construct('seed', $options);
$this->master = array_get($options, 'master', false);
}