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()}); } }
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 }