Esempio n. 1
0
 /**
  * @internal
  * @param  string column name
  * @param  bool|NULL TRUE - cache, FALSE - don't cache, NULL - remove
  * @return bool
  */
 public function access($key, $cache = TRUE)
 {
     if ($cache === NULL) {
         if (is_array($this->accessed)) {
             $this->accessed[$key] = FALSE;
         }
         return FALSE;
     }
     if ($key === NULL) {
         $this->accessed = '';
     } elseif (!is_string($this->accessed)) {
         $this->accessed[$key] = $cache;
     }
     if ($cache && !$this->sqlBuilder->getSelect() && $this->prevAccessed && ($key === NULL || !isset($this->prevAccessed[$key]))) {
         $this->prevAccessed = '';
         $this->emptyResultSet();
         return TRUE;
     }
     return FALSE;
 }