public function setId($id)
    {
        if ($this->_id !== null && $this->_id != $id) {
            throw new PodException('Cannot update the id of an existing document');
        }

        if (!preg_match('/^\w+\/\w+$/', $id)) {
            throw new PodException('Invalid format for document id');
        }

        @list(, $documentId) = explode('/', $id, 2);
        $this->_key = $documentId;
        $this->_id = (string) $id;
    }
public function setId($id)
    {
        if ($this->_id !== null && $this->_id != $id) {
            throw new PodException('Cannot update the id of an existing document');
        }

        if (!preg_match('/^\w+\/\w+$/', $id)) {
            throw new PodException('Invalid format for document id');
        }

        @list(, $documentId) = explode('/', $id, 2);
        $this->_key = $documentId;
        $this->_id = (string) $id;
    }
public function setId ( $ id ) { if ( $ this -> _id !== null && $ this -> _id != $ id ) { throw new PodException ( 'Cannot update the id of an existing document' ) ; } if ( ! preg_match ( '/^\w+\/\w+$/' , $ id ) ) { throw new PodException ( 'Invalid format for document id' ) ; } @ list ( , $ documentId ) = explode ( '/' , $ id , 2 ) ; $ this -> _key = $ documentId ; $ this -> _id = ( string ) $ id ; }
Set the id for this pod. The id is only allowed to be set once, because once saved to the server, the id can't be changed.
@param  string       $id
@throws PodException
Set the id for this pod . The id is only allowed to be set once because once saved to the server the id can t be changed .