public function exists($query) { $query = Horde_Rdo_Query::create($query, $this); $query->setFields(1)->clearSort(); list($sql, $bindParams) = $query->getQuery(); return (bool) $this->adapter->selectValue($sql, $bindParams); }
/** * Implementation of the offsetExists() method for ArrayAccess * This method is executed when using isset() or empty() on Horde_Rdo_List objects * @param integer $offset The offset to check. * * @return boolean Whether or not an offset exists. */ public function offsetExists($offset) { $query = Horde_Rdo_Query::create($this->_query); $query->limit(1, $offset); return $this->_mapper->exists($query); }