Nette\Database\Table\Selection::createSelectionInstance PHP Метод

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

public createSelectionInstance ( $table = NULL )
    public function createSelectionInstance($table = NULL)
    {
        return new self($this->context, $this->conventions, $table ?: $this->name, $this->cache ? $this->cache->getStorage() : NULL);
    }

Usage Example

Пример #1
0
 /**
  * Deletes row.
  * @return int number of affected rows
  */
 public function delete()
 {
     $res = $this->table->createSelectionInstance()->wherePrimary($this->getPrimary())->delete();
     if ($res > 0 && ($signature = $this->getSignature(FALSE))) {
         unset($this->table[$signature]);
     }
     return $res;
 }