src/FreeFW/JsonApi/V1/Model/Document.php
protected function getFromObject(\stdClass $p_data = null)
    {
        if (isset($p_data->data)) {
            $data = $p_data->data;
            if ($data instanceof \stdClass) {
                // Single object
                $this->data = $this->getResourceObject($data);
            } else {
                if (is_array($data)) {
                    // Collection
                } else {
                    // @todo
                }
            }
        }
        return $this;
    }
protected function getFromObject(\stdClass $p_data = null)
    {
        if (isset($p_data->data)) {
            $data = $p_data->data;
            if ($data instanceof \stdClass) {
                // Single object
                $this->data = $this->getResourceObject($data);
            } else {
                if (is_array($data)) {
                    // Collection
                } else {
                    // @todo
                }
            }
        }
        return $this;
    }
protected function getFromObject ( \ stdClass $ p_data = null ) { if ( isset ( $ p_data -> data ) ) { $ data = $ p_data -> data ; if ( $ data instanceof \ stdClass ) { // Single object $ this -> data = $ this -> getResourceObject ( $ data ) ; } else { if ( is_array ( $ data ) ) { // Collection } else { // @todo } } } return $ this ; }
Get from StdClass

@param \stdClass $p_data

@return \FreeFW\JsonApi\V1\Model\Document
Get from StdClass