Esempio n. 1
0
 public function has($alias, $far_keys = NULL, $cache = TRUE)
 {
     $tmp = $far_keys ? $far_keys : 'default';
     if (is_object($tmp) and $tmp instanceof ORM) {
         $tmp = $tmp->id;
     }
     if ($cache and isset($this->_cached_has[$alias]) and isset($this->_cached_has[$alias][$tmp])) {
         return $this->_cached_has[$alias][$tmp];
     }
     if (!isset($this->_cached_has[$alias])) {
         $this->_cached_has[$alias] = array();
     }
     $has = parent::has($alias, $far_keys);
     $this->_cached_has[$alias][$tmp] = $has;
     return $has;
 }