original_string: public function delete()
  	{
  		$this->verifyNotReadonly('delete');
  
  		$pk = $this->valuesForPk();
  
  		if (empty($pk))
  			throw new ActiveRecordException("Cannot delete, no primary key defined for: " . get_called_class());
  
  		if (!$this->invokeCallback('beforeDestroy',false))
  			return false;
  
  		static::table()->delete($pk);
  		$this->invokeCallback('afterDestroy',false);
  
  		return true;
  	}
code: public function delete()
  	{
  		$this->verifyNotReadonly('delete');
  
  		$pk = $this->valuesForPk();
  
  		if (empty($pk))
  			throw new ActiveRecordException("Cannot delete, no primary key defined for: " . get_called_class());
  
  		if (!$this->invokeCallback('beforeDestroy',false))
  			return false;
  
  		static::table()->delete($pk);
  		$this->invokeCallback('afterDestroy',false);
  
  		return true;
  	}
code_tokens: public function delete ( ) { $ this -> verifyNotReadonly ( 'delete' ) ; $ pk = $ this -> valuesForPk ( ) ; if ( empty ( $ pk ) ) throw new ActiveRecordException ( "Cannot delete, no primary key defined for: " . get_called_class ( ) ) ; if ( ! $ this -> invokeCallback ( 'beforeDestroy' , false ) ) return false ; static :: table ( ) -> delete ( $ pk ) ; $ this -> invokeCallback ( 'afterDestroy' , false ) ; return true ; }
docstring: Deletes this model from the database and returns true if successful.
  
  @return boolean
docstring_tokens: Deletes this model from the database and returns true if successful .