for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* components
*
* @author Wolfy-J
*/
namespace Spiral\ORM\Commands;
use Spiral\Database\Entities\Table;
class DeleteCommand extends TableCommand
{
* Where conditions (short where format).
* @var array
private $where = [];
* @param Table $table
* @param mixed $where
public function __construct(Table $table, array $where)
parent::__construct($table);
$this->where = $where;
}
* @param array $where
public function setWhere(array $where)
* Inserting data into associated table.
public function execute()
$this->table->delete($this->where)->run();
parent::execute();