offsetGet() public method

Returns specified row.
public offsetGet ( $key ) : Nette\Database\Table\IRow
return Nette\Database\Table\IRow or NULL if there is no such row
Beispiel #1
0
 /**
  * Returns specified row.
  *
  * @param mixed $key Row's primary key
  * @return HyperRow|NULL if there is no such row
  */
 public function offsetGet($key)
 {
     $result = $this->selection->offsetGet($key);
     if ($result instanceof ActiveRow) {
         return $this->factory->createRow($result, $this->selection->getName());
     }
     return $result;
 }