25 #require_once 'Zend/Validate/Abstract.php'; 48 self::ERROR_NO_RECORD_FOUND =>
"No record matching '%value%' was found",
49 self::ERROR_RECORD_FOUND =>
"A record matching '%value%' was found",
110 }
else if (func_num_args() > 1) {
112 $temp[
'table'] = array_shift(
$options);
113 $temp[
'field'] = array_shift(
$options);
115 $temp[
'exclude'] = array_shift(
$options);
119 $temp[
'adapter'] = array_shift(
$options);
125 if (!array_key_exists(
'table',
$options) && !array_key_exists(
'schema',
$options)) {
126 #require_once 'Zend/Validate/Exception.php'; 130 if (!array_key_exists(
'field',
$options)) {
131 #require_once 'Zend/Validate/Exception.php'; 135 if (array_key_exists(
'adapter',
$options)) {
139 if (array_key_exists(
'exclude',
$options)) {
144 if (array_key_exists(
'table',
$options)) {
148 if (array_key_exists(
'schema',
$options)) {
164 if ($this->_adapter ===
null) {
166 if (
null === $this->_adapter) {
167 #require_once 'Zend/Validate/Exception.php'; 184 #require_once 'Zend/Validate/Exception.php'; 210 $this->_exclude = $exclude;
232 $this->_field = (string) $field;
254 $this->_table = (string)
$table;
291 'Zend_Db_Select object');
307 if (
null === $this->_select) {
313 $select->from($this->_table, array($this->_field), $this->_schema);
314 if ($db->supportsParameters(
'named')) {
315 $select->where($db->quoteIdentifier($this->_field,
true).
' = :value');
317 $select->where($db->quoteIdentifier($this->_field,
true).
' = ?');
319 if ($this->_exclude !==
null) {
320 if (is_array($this->_exclude)) {
322 $db->quoteIdentifier($this->_exclude[
'field'],
true) .
323 ' != ?', $this->_exclude[
'value']
326 $select->where($this->_exclude);
static getDefaultAdapter()
const ERROR_NO_RECORD_FOUND