src/main/php/input/RequestParser.php
public function parseInto($object, string $group = null)
    {
        if ($this->request->hasParam('h') || $this->request->hasParam('help')) {
            throw new HelpScreen(
                    $this->request->readEnv('SCRIPT_NAME')->unsecure(),
                    $object,
                    $group
            );
        }

        $this->requestBroker->procure($this->request, $object, $group);
        if ($this->request->paramErrors()->exist()) {
            throw new InvalidOptionValue(
                    $this->request->paramErrors(),
                    $this->errorMessages
            );
        }

        if (method_exists($object, 'finalizeInput')) {
            $object->finalizeInput();
        }

        return $object;
    }
public function parseInto($object, string $group = null)
    {
        if ($this->request->hasParam('h') || $this->request->hasParam('help')) {
            throw new HelpScreen(
                    $this->request->readEnv('SCRIPT_NAME')->unsecure(),
                    $object,
                    $group
            );
        }

        $this->requestBroker->procure($this->request, $object, $group);
        if ($this->request->paramErrors()->exist()) {
            throw new InvalidOptionValue(
                    $this->request->paramErrors(),
                    $this->errorMessages
            );
        }

        if (method_exists($object, 'finalizeInput')) {
            $object->finalizeInput();
        }

        return $object;
    }
public function parseInto ( $ object , string $ group = null ) { if ( $ this -> request -> hasParam ( 'h' ) || $ this -> request -> hasParam ( 'help' ) ) { throw new HelpScreen ( $ this -> request -> readEnv ( 'SCRIPT_NAME' ) -> unsecure ( ) , $ object , $ group ) ; } $ this -> requestBroker -> procure ( $ this -> request , $ object , $ group ) ; if ( $ this -> request -> paramErrors ( ) -> exist ( ) ) { throw new InvalidOptionValue ( $ this -> request -> paramErrors ( ) , $ this -> errorMessages ) ; } if ( method_exists ( $ object , 'finalizeInput' ) ) { $ object -> finalizeInput ( ) ; } return $ object ; }
parses request data into given object

Prints help for given object when -h or --help param is set.

@param   object  $object
@param   string  $group   restrict parsing to given group
@return  object
@throws  \stubbles\console\input\HelpScreen
@throws  \stubbles\console\input\InvalidOptionValue
parses request data into given object