public function __construct() { parent::__construct(); $this->_input = fopen("php://stdin", "r"); $this->_output = fopen("php://stdout", "w"); $this->_color = new Color(); $this->_reflect = new \ReflectionClass($this); $this->_command = Inflector::underscore(substr($this->_reflect->getShortName(), 0, -10)); $this->_commandColor = '<bold><green>' . $this->_command . '</green></bold>'; $this->writeln("Solve console v0.1\n"); }
public function __construct() { parent::__construct(); $this->_sessionToken = RemoteSessionManager::getSessionToken(); $this->_sessionStorage = new SessionStorage(null, 'api_session'); $this->_data = new ArrayStorage(); $action = DC::getApplication()->getRoute()->getActionName(); $action = substr($action, 0, -6); if (!in_array($action, $this->_unprotectedMethods)) { $this->requireAuthorization(); } }
public function __construct() { parent::__construct(); $this->view->setResponseFormat(View::FORMAT_JSON); }