コード例 #1
0
ファイル: Command.php プロジェクト: retailcrm/legacy
 public function run()
 {
     if (!$this->run) {
         CommandHelper::runHelp();
         return;
     }
     $debug = new DebugHelper();
     if ($this->debug) {
         $debug->write(sprintf('Start %s', ucfirst($this->run)));
     }
     $command = sprintf('run%s', ucfirst($this->run));
     $this->{$command}();
     if ($this->debug) {
         $debug->write(sprintf('End %s', ucfirst($this->run)));
     }
 }
コード例 #2
0
ファイル: app.php プロジェクト: retailcrm/legacy
<?php

if (function_exists('date_default_timezone_set') && function_exists('date_default_timezone_get')) {
    date_default_timezone_set(@date_default_timezone_get());
}
require_once 'bootstrap.php';
$shortopts = 'dluce:m:p:r:h:';
$options = getopt($shortopts);
if (isset($options['e'])) {
    $command = new Command($options);
    $command->run();
} else {
    CommandHelper::runHelp();
}