src/Entities.php
public function findOneByID($moduleName, $entityID, array $select = [ ])
    {
        $entityID = $this->wsClient->modules->getTypedID($moduleName, $entityID);
        $record = $this->wsClient->invokeOperation('retrieve', [ 'id' => $entityID ], 'GET');
        if (!is_array($record)) {
            return null;
        }

        return (empty($select))
            ? $record
            : array_intersect_key($record, array_flip($select));
    }
public function findOneByID($moduleName, $entityID, array $select = [ ])
    {
        $entityID = $this->wsClient->modules->getTypedID($moduleName, $entityID);
        $record = $this->wsClient->invokeOperation('retrieve', [ 'id' => $entityID ], 'GET');
        if (!is_array($record)) {
            return null;
        }

        return (empty($select))
            ? $record
            : array_intersect_key($record, array_flip($select));
    }
public function findOneByID ( $ moduleName , $ entityID , array $ select = [ ] ) { $ entityID = $ this -> wsClient -> modules -> getTypedID ( $ moduleName , $ entityID ) ; $ record = $ this -> wsClient -> invokeOperation ( 'retrieve' , [ 'id' => $ entityID ] , 'GET' ) ; if ( ! is_array ( $ record ) ) { return null ; } return ( empty ( $ select ) ) ? $ record : array_intersect_key ( $ record , array_flip ( $ select ) ) ; }
Retrieves an entity by ID
@param  string  $moduleName The name of the module / entity type
@param  string  $entityID The ID of the entity to retrieve
@return array   $select  The list of fields to select (defaults to SQL-like '*' - all the fields)
@return array  Entity data
Retrieves an entity by ID