예제 #1
0
 /**
  * Parses actions for shell script
  *
  */
 protected function _parseArgs()
 {
     foreach ($_SERVER['argv'] as $index => $argument) {
         if (isset($this->_actionArgsMap[$argument])) {
             $this->_action = $argument;
             unset($_SERVER['argv'][$index]);
             break;
         }
         unset($_SERVER['argv'][$index]);
     }
     parent::_parseArgs();
 }
예제 #2
0
 protected function _parseArgs()
 {
     if (empty($this->_args) && !empty($_SERVER['argv'])) {
         return parent::_parseArgs();
     }
     return $this;
 }