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


PHP CConsoleCommand::init方法代码示例

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


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

示例1: init

 /**
  * Ini system param
  */
 public function init()
 {
     parent::init();
     ini_set('memory_limit', '-1');
     set_time_limit(0);
     $this->_logger = LoggerFactory::getFileLogger('process_sync_db');
 }
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:10,代码来源:SyncDBCommand.php

示例2: init

 public function init()
 {
     parent::init();
     Yii::getLogger()->autoFlush = 10;
     Yii::getLogger()->detachEventHandler('onFlush', array(Yii::app()->log, 'collectLogs'));
     Yii::getLogger()->attachEventHandler('onFlush', array($this, 'processLogs'));
 }
开发者ID:alexanderkuz,项目名称:test-yii2,代码行数:7,代码来源:C2goCConsoleCommand.php

示例3: init

 public function init()
 {
     parent::init();
     ini_set('memory_limit', '-1');
     set_time_limit(0);
     // All reports are generated basing on data in UTC time.
     TimezoneWork::set('UTC');
 }
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:8,代码来源:ReportSendTestCommand.php

示例4: init

 public function init()
 {
     parent::init();
     ini_set('memory_limit', '-1');
     set_time_limit(0);
     $this->_logger = LoggerFactory::getFileLogger('sms');
     //		$this->_logger = LoggerFactory::getConsoleLogger();
 }
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:8,代码来源:SmsSendCommand.php

示例5: init

 /**
  * Initialize the command object.
  */
 public function init()
 {
     // Tell yii to flush the logs every message (instead of buffering for the default 10,000)
     // Without this, you cannot use the log to find out where the script has got to in it's current run.
     Yii::getLogger()->autoFlush = 1;
     Yii::getLogger()->autoDump = true;
     parent::init();
 }
开发者ID:peopleperhour,项目名称:yii-ses-feedback,代码行数:11,代码来源:ASesFeedbackCommand.php

示例6: init

 public function init()
 {
     parent::init();
     Yii::import('application.modules.yupe.components.*');
     Yii::import('application.modules.yupe.models.*');
     Yii::import('application.modules.comment.models.*');
     $this->migrator = is_object($this->migrator) ? $this->migrator : new Migrator();
     $this->db = is_object($this->db) ? $this->db : Yii::app()->db;
 }
开发者ID:alextravin,项目名称:yupe,代码行数:9,代码来源:MigrateToNestedSetsCommand.php

示例7: init

 public function init()
 {
     parent::init();
     ini_set('memory_limit', '-1');
     set_time_limit(0);
     self::$_logger = LoggerFactory::getFileLogger('reports');
     // All reports are generated basing on data in UTC time.
     TimezoneWork::set('UTC');
 }
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:9,代码来源:ScheduleCommand_old.php

示例8: init

 public function init()
 {
     parent::init();
     ini_set('memory_limit', '-1');
     ini_set('display_errors', '1');
     set_time_limit(0);
     error_reporting(E_ALL);
     $this->_logger = LoggerFactory::getFileLogger('poller');
     //		$this->_logger = LoggerFactory::getConsoleLogger(); // For testing
 }
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:10,代码来源:PollingCommand.php

示例9: init

 /**
  * Ini system param
  */
 public function init()
 {
     parent::init();
     ini_set('memory_limit', '-1');
     set_time_limit(0);
     error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
     $this->_synchronization = new Synchronization();
     $this->_logger = LoggerFactory::getFileLogger('TcpClientCommand');
     //        $this->_logger = LoggerFactory::getConsoleLogger();
     if (Synchronization::setTcpClientPid(getmypid())) {
         $this->_logger->log(__METHOD__ . ' ' . 'process can take pid = ' . getmypid());
     } else {
         $this->_logger->log(__METHOD__ . ' ' . 'process can not take pid.');
     }
 }
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:18,代码来源:TcpClientCommand.php

示例10: init

 /**
  * Initialize empty config parameters.
  */
 public function init()
 {
     parent::init();
     //Checking PHP interpriter path
     if ($this->interpreterPath === null) {
         if ($this->isWindowsOS()) {
             //Windows OS
             $this->interpreterPath = 'php.exe';
         } else {
             //nix based OS
             $this->interpreterPath = '/usr/bin/env php';
         }
     }
     //Checking logs directory
     if ($this->logsDir === null) {
         $this->logsDir = Yii::app()->getRuntimePath();
     }
     //Checking bootstrap script
     if ($this->bootstrapScript === null) {
         $this->bootstrapScript = realpath($this->getCommandRunner()->getScriptName());
     }
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:25,代码来源:PHPDocCrontab.php

示例11: init

 public function init()
 {
     parent::init();
     ini_set('memory_limit', '-1');
     set_time_limit(0);
     error_reporting(E_ALL & ~E_WARNING);
     date_default_timezone_set('UTC');
     /**
      * For flexibility system
      */
     $this->founded_in = date('YmdHis');
     /**
      * Logger
      */
     $this->logger = LoggerFactory::getFileLogger('SyncStatusCommand');
     //        $this->logger = LoggerFactory::getConsoleLogger();
     /**
      * Settings
      */
     $this->settings = new Synchronization();
     /**
      * Check pid
      */
     if ($this->settings->getSynsStatusCommandPid() && ProcessPid::isActiveProcess($this->settings->getSynsStatusCommandPid())) {
         exit;
     } else {
         $this->settings->setSynsStatusCommandPid(getmypid());
     }
     /**
      * Connector
      */
     $server = ['ip' => $this->settings->server_ip, 'port' => $this->settings->server_port];
     $client = ['ip' => $this->settings->remote_server_ip, 'port' => $this->settings->remote_server_port];
     $this->connector = new UDPConnector($this->logger, $server, $client);
     /**
      * Message
      */
     $this->message_features = [SyncStatusHandler::MESSAGE_TYPE => 'S', SyncStatusHandler::MESSAGE_FROM => $this->settings->getIdentificator(), SyncStatusHandler::FOUNDED_IN => $this->founded_in];
 }
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:39,代码来源:SyncStatusCommand.php

示例12: init

 /**
  * initialize the colors
  */
 public function init()
 {
     parent::init();
     $this->_shellAlert = new ShellColors();
 }
开发者ID:schmunk42,项目名称:giic,代码行数:8,代码来源:GiicCommand.php

示例13: init

 public function init()
 {
     ini_set('memory_limit', '-1');
     set_time_limit(0);
     parent::init();
 }
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:6,代码来源:ListenCommand.php

示例14: init

 public function init()
 {
     echo "Deleting Inactive Users Older than days specified \n";
     parent::init();
 }
开发者ID:janym,项目名称:angular-yii,代码行数:5,代码来源:Clear_inactiveCommand.php

示例15: init

 /**
  *
  */
 public function init()
 {
     $this->timer = YII_BEGIN_TIME;
     parent::init();
 }
开发者ID:zainengineer,项目名称:yii-dressing,代码行数:8,代码来源:YdConsoleCommand.php


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