public function getPrimaryKey()
    {
        if ($this->_primaryKey === null) {
            $schema = $this->getSchema();
            if (!$schema) {
                throw new UnexpectedDriverException(__('No schema has been defined for this endpoint'));
            }
            $key = (array)$schema->primaryKey();
            if (count($key) === 1) {
                $key = $key[0];
            }
            $this->_primaryKey = $key;
        }

        return $this->_primaryKey;
    }
public function getPrimaryKey()
    {
        if ($this->_primaryKey === null) {
            $schema = $this->getSchema();
            if (!$schema) {
                throw new UnexpectedDriverException(__('No schema has been defined for this endpoint'));
            }
            $key = (array)$schema->primaryKey();
            if (count($key) === 1) {
                $key = $key[0];
            }
            $this->_primaryKey = $key;
        }

        return $this->_primaryKey;
    }
public function getPrimaryKey ( ) { if ( $ this -> _primaryKey === null ) { $ schema = $ this -> getSchema ( ) ; if ( ! $ schema ) { throw new UnexpectedDriverException ( __ ( 'No schema has been defined for this endpoint' ) ) ; } $ key = ( array ) $ schema -> primaryKey ( ) ; if ( count ( $ key ) === 1 ) { $ key = $ key [ 0 ] ; } $ this -> _primaryKey = $ key ; } return $ this -> _primaryKey ; }
Get the endpoints primary key, if one is not set, fetch it from the schema

@return array|string
@throws \Muffin\Webservice\Exception\UnexpectedDriverException When no schema exists to fetch the key from
Get the endpoints primary key if one is not set fetch it from the schema