Beispiel #1
0
 public function item($i)
 {
     if (in_array($i, $this->_fields) || $i === "any") {
         $f = new Default_Model_FilterItem($i, $this);
     } else {
         $found = false;
         foreach ($this->_fields as $ii) {
             //debug_log('/^' . $ii . '$/');
             if (preg_match('/^' . $ii . '$/', $i)) {
                 $found = true;
                 $f = new Default_Model_FilterItem($i, $this);
                 break;
             }
         }
         if (!$found) {
             $f = new Default_Model_FilterItem($this->_fields[0], $this);
         }
     }
     $f->setDialect($this->_dialect);
     return $f;
 }