src/Model/Result.php
public function getEntity()
    {
        if (!isset($this->data['_embedded']['entity']) || !isset($this->resourceClass)) {
            throw new \Exception("No entity found in result");
        }

        $data = $this->data['_embedded']['entity'];
        $resourceClass = $this->resourceClass;
        return new $resourceClass($data, $this->baseUrl, $this->client);
    }
public function getEntity()
    {
        if (!isset($this->data['_embedded']['entity']) || !isset($this->resourceClass)) {
            throw new \Exception("No entity found in result");
        }

        $data = $this->data['_embedded']['entity'];
        $resourceClass = $this->resourceClass;
        return new $resourceClass($data, $this->baseUrl, $this->client);
    }
public function getEntity ( ) { if ( ! isset ( $ this -> data [ '_embedded' ] [ 'entity' ] ) || ! isset ( $ this -> resourceClass ) ) { throw new \ Exception ( "No entity found in result" ) ; } $ data = $ this -> data [ '_embedded' ] [ 'entity' ] ; $ resourceClass = $ this -> resourceClass ; return new $ resourceClass ( $ data , $ this -> baseUrl , $ this -> client ) ; }
Get the entity embedded in the result.

@throws \Exception If no entity was embedded.

@return ApiResourceBase
An instance of ApiResourceBase - the implementing class name was set
when this Result was instantiated.
Get the entity embedded in the result .