src/Controller/Base.php
protected static function getRequestRelationships($parameters)
    {
        //work with objects
        if (!is_object($parameters) && is_array($parameters)) {
            $parameters = (object) $parameters;
        }

        //Require data
        Request::requireParameters($parameters, ['data']);

        //Require data['relationships']
        if (isset($parameters->data->relationships)) {
            return (object) $parameters->data->relationships;
        } else {
            return new \stdClass();
        }
    }
protected static function getRequestRelationships($parameters)
    {
        //work with objects
        if (!is_object($parameters) && is_array($parameters)) {
            $parameters = (object) $parameters;
        }

        //Require data
        Request::requireParameters($parameters, ['data']);

        //Require data['relationships']
        if (isset($parameters->data->relationships)) {
            return (object) $parameters->data->relationships;
        } else {
            return new \stdClass();
        }
    }
protected static function getRequestRelationships ( $ parameters ) { //work with objects if ( ! is_object ( $ parameters ) && is_array ( $ parameters ) ) { $ parameters = ( object ) $ parameters ; } //Require data Request :: requireParameters ( $ parameters , [ 'data' ] ) ; //Require data['relationships'] if ( isset ( $ parameters -> data -> relationships ) ) { return ( object ) $ parameters -> data -> relationships ; } else { return new \ stdClass ( ) ; } }
Get request relationships if any attributes.
@param  object $parameters Request parameters
@return object
Get request relationships if any attributes .