Components_Config::getArguments PHP Method

getArguments() public method

Return the arguments provided by the configuration handlers.
public getArguments ( ) : array
return array An array of arguments.
    public function getArguments();

Usage Example

Example #1
0
 public function run()
 {
     $arguments = $this->_config->getArguments();
     $options = array_merge(array('new_version' => false, 'new_api' => false, 'new_state' => false, 'new_apistate' => false), $this->_config->getOptions());
     if (!empty($options['updatexml']) || isset($arguments[0]) && $arguments[0] == 'update') {
         $action = !empty($options['action']) ? $options['action'] : 'update';
         if (!empty($options['pretend']) && $action == 'update') {
             $action = 'diff';
         }
         if (!empty($options['commit'])) {
             $options['commit'] = new Components_Helper_Commit($this->_output, $options);
         }
         $result = $this->_config->getComponent()->updatePackageXml($action, $options);
         if (!empty($options['new_version']) || !empty($options['new_api'])) {
             $this->_config->getComponent()->setVersion($options['new_version'], $options['new_api'], $options);
         }
         if (!empty($options['new_state']) || !empty($options['new_apistate'])) {
             $this->_config->getComponent()->setState($options['new_state'], $options['new_apistate'], $options);
         }
         if (!empty($options['commit'])) {
             $options['commit']->commit('Components updated the package.xml.');
         }
         if ($result === true) {
             $this->_output->ok('Successfully updated package.xml of ' . $this->_config->getComponent()->getName() . '.');
         } else {
             print $result;
         }
     }
 }
All Usage Examples Of Components_Config::getArguments