/** * Constructor * * Instantiate the Gateway\Row object. * * @param \Pop\Db\Sql $sql * @param mixed $keys * @param string $table * @throws Exception * @return Row */ public function __construct(\Pop\Db\Sql $sql, $keys = null, $table = null) { if (null !== $keys) { $this->setPrimaryKeys($keys); } parent::__construct($sql, $table); }
/** * Remove um registro do banco de dados. * * @return bool */ public function delete(array $where) { return $this->gateway->delete($where); }
/** * Returns XMLChunk objects matching the given filters. * * Any number of strings can be passed as arguments, each of which * has to be in the form of "property operator value", where the * property can be any of the returned instances' instance variables, * the operator can be one of < > <> >= <= != = == ~ The value must * not be quoted and if it should be an empty string, it should * simply be left out (e.g. "title !="). * * @return XMLChunk[] */ public function find() { $chunk = $this->factory->createXMLChunk(); $properties = array_keys($chunk->toArray()); return parent::performFind(get_class($chunk), $properties, 'id', func_get_args()); }
/** * Returns Section objects matching the given filters. * * Any number of strings can be passed as arguments, each of which * has to be in the form of "property operator value", where the * property can be any of the returned instances' instance variables, * the operator can be one of < > <> >= <= != = == ~ The value must * not be quoted and if it should be an empty string, it should * simply be left out (e.g. "title !="). * * @return Section[] * @throws \InvalidArgumentException */ public function find() { $section = $this->factory->createSection(); $properties = array_keys($section->toArray()); return parent::performFind(get_class($section), $properties, 'id', func_get_args()); }
/** * Returns Element objects matching the given filters. * * Any number of strings can be passed as arguments, each of which * has to be in the form of "property operator value", where the * property can be any of the returned instances' instance variables, * the operator can be one of < > <> >= <= != = == ~ The value must * not be quoted and if it should be an empty string, it should * simply be left out (e.g. "title !="). * * @return Element[] */ public function find() { $element = $this->factory->createElement(); $properties = array_keys($element->toArray()); return parent::performFind(get_class($element), $properties, 'chunk', func_get_args()); }
/** * Returns Page objects matching the given filters. * * Any number of strings can be passed as arguments, each of which * has to be in the form of "property operator value", where the * property can be any of the returned instances' instance variables, * the operator can be one of < > <> >= <= != = == ~ The value must * not be quoted and if it should be an empty string, it should * simply be left out (e.g. "title !="). * * @return Page[] */ public function find() { $page = $this->factory->createPage(); $properties = array_keys($page->toArray()); return parent::performFind(get_class($page), $properties, 'number', func_get_args()); }
/** * Returns NamedEntity objects matching the given filters. * * Any number of strings can be passed as arguments, each of which * has to be in the form of "property operator value", where the * property can be any of the returned instances' instance variables, * the operator can be one of < > <> >= <= != = == ~ The value must * not be quoted and if it should be an empty string, it should * simply be left out (e.g. "title !="). * * @return NamedEntity[] */ public function find() { $entity = $this->factory->createNamedEntity(); $properties = array_keys($entity->toArray()); return parent::performFind(get_class($entity), $properties, '', func_get_args()); }