本文整理汇总了PHP中CConsoleCommand::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP CConsoleCommand::__construct方法的具体用法?PHP CConsoleCommand::__construct怎么用?PHP CConsoleCommand::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConsoleCommand
的用法示例。
在下文中一共展示了CConsoleCommand::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name, $runner)
{
parent::__construct($name, $runner);
if ($this->_log == null) {
$this->_log = new CronFileLogRoute('command_update');
}
}
示例2: __construct
/**
* GenerateWorklistsCommand constructor.
*
* @param string $name
* @param CConsoleCommandRunner $runner
* @param WorklistManager $manager
*/
public function __construct($name, $runner, $manager = null)
{
if (is_null($manager)) {
$manager = new WorklistManager();
}
$this->manager = $manager;
parent::__construct($name, $runner);
}
示例3: __construct
public function __construct($id, $module = null)
{
parent::__construct($id, $module);
$this->product_model = new Product();
$this->productType_model = new ProductType();
$this->productPublish_model = new ProductPublish();
$this->userProductBuy_model = new UserProductBuy();
$this->buyLogs_model = new BuyLogs();
$this->tradingRecord_model = new TradingRecord();
$this->userInfo_model = new Userinfo();
}
示例4: __construct
public function __construct()
{
$this->path = Yii::app()->params['hscic']['data']['path'];
$this->tempPath = Yii::app()->params['hscic']['data']['temp_path'];
if (!file_exists($this->path)) {
mkdir($this->path, 0777, true);
}
if (!file_exists($this->tempPath)) {
mkdir($this->tempPath, 0777, true);
}
$this->files = $this->mapFileConfig(static::$file_config);
parent::__construct(null, null);
}
示例5: __construct
public function __construct($name, $runner)
{
//non conflicting alias
$alias = md5(__DIR__);
Yii::setPathOfAlias($alias, __DIR__);
//configuring
$configPath = Yii::getPathOfAlias($alias . '.configs');
$config = new CConfiguration(array('alias' => $alias));
$config->loadFromFile($configPath . '/stdConfig.php');
//base config
if ($this->config) {
$config->loadFromFile($configPath . '/' . $this->config . '.php');
}
foreach ($config as $key => $val) {
$this->{$key} = $val;
}
//do import
Yii::import($alias . '.*', true);
Yii::import($alias . '.iterators.*', true);
//set translaitor
Yii::app()->setComponent('docBlockMessage', Yii::createComponent($this->messageSource));
parent::__construct($name, $runner);
}
示例6: __construct
public function __construct($name, $runner)
{
parent::__construct($name, $runner);
}
示例7: __construct
public function __construct($name, $runner)
{
parent::__construct($name, $runner);
$this->logCommand();
}
示例8: __construct
public function __construct($name, $runner)
{
parent::__construct($name, $runner);
$this->inputPath = realpath(dirname(__FILE__) . '/..') . '/data';
$this->dictFile = realpath(dirname(__FILE__) . '/../../../../etc') . '/py.xdb';
}