Bluz\Db\Row::delete PHP Метод

delete() публичный Метод

Delete existing row
public delete ( ) : integer
Результат integer The number of deleted rows
    public function delete()
    {
        /**
         * Execute pre-DELETE logic
         */
        $this->beforeDelete();
        $primaryKey = $this->getPrimaryKey();
        /**
         * Execute the DELETE (this may throw an exception)
         */
        $table = $this->getTable();
        $result = $table->delete($primaryKey);
        /**
         * Execute post-DELETE logic
         */
        $this->afterDelete();
        /**
         * Reset all fields to null to indicate that the row is not there
         */
        $this->resetArray();
        return $result;
    }