src/Manager/ErrorAbortManager.php
public function parse(Input $input)
    {
        // fill config
        $this->config = $this->default;

        if ($input instanceof RequestInput) {
            $this->config['optional_item_id'] = true;
        }

        $object = $input->getAsObject();

        $document = $this->getFactory()->make(
            'Document',
            [$object, $this, new RootAccessable]
        );

        // Clear config
        $this->config = [];

        return $document;
    }
public function parse(Input $input)
    {
        // fill config
        $this->config = $this->default;

        if ($input instanceof RequestInput) {
            $this->config['optional_item_id'] = true;
        }

        $object = $input->getAsObject();

        $document = $this->getFactory()->make(
            'Document',
            [$object, $this, new RootAccessable]
        );

        // Clear config
        $this->config = [];

        return $document;
    }
public function parse ( Input $ input ) { // fill config $ this -> config = $ this -> default ; if ( $ input instanceof RequestInput ) { $ this -> config [ 'optional_item_id' ] = true ; } $ object = $ input -> getAsObject ( ) ; $ document = $ this -> getFactory ( ) -> make ( 'Document' , [ $ object , $ this , new RootAccessable ] ) ; // Clear config $ this -> config = [ ] ; return $ document ; }
Parse the input

@param Art4\JsonApiClient\Input\Input $input

@throws Art4\JsonApiClient\Exception\ValidationException If $input contains invalid JSON API

@return \Art4\JsonApiClient\Accessable
Parse the input