コード例 #1
0
ファイル: Cli.php プロジェクト: bokultis/kardiomedika
 public function __construct(Zend_Console_Getopt $getopt)
 {
     $this->_getopt = $getopt;
     $getopt->parse();
     if ($getopt->{$this->getModuleKey()}) {
         $this->setModuleName(HCLI_Controller_Util::decode($getopt->{$this->getModuleKey()}));
     }
     if ($getopt->{$this->getControllerKey()}) {
         $this->setControllerName(HCLI_Controller_Util::decode($getopt->{$this->getControllerKey()}));
     }
     if ($getopt->{$this->getActionKey()}) {
         $this->setActionName($getopt->{$this->getActionKey()});
     }
 }
コード例 #2
0
ファイル: Spawn.php プロジェクト: bokultis/kardiomedika
 public function direct(array $parameters = null, $controller = null, $action = null, $module = null)
 {
     if (is_null($parameters)) {
         $parameters = array();
     } else {
         foreach ($parameters as $key => $value) {
             $parameters[$key] = escapeshellarg($value);
         }
     }
     if ($module) {
         $parameters['-m'] = escapeshellarg(HCLI_Controller_Util::encode($module));
     }
     if ($controller) {
         $parameters['-c'] = escapeshellarg(HCLI_Controller_Util::encode($controller));
     }
     if ($action) {
         $parameters['-a'] = escapeshellarg($action);
     }
     $this->_spawnProcess($parameters);
     $this->_scriptPath = null;
     // reset
 }