本文整理匯總了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';
}