/** * Add object to cache, handling our own indices. * * @param Blog * @return boolean True on add, false if already existing. */ function add(&$Blog) { if (!empty($Blog->siteurl) && preg_match('~^https?://~', $Blog->siteurl)) { // absolute siteurl $this->cache_siteurl_abs[$Blog->siteurl] =& $Blog; } $this->cache_urlname[$Blog->urlname] =& $Blog; return parent::add($Blog); }
/** * Overload parent's function to also maintain the login cache. * * @param User * @return boolean */ function add(&$Obj) { if (parent::add($Obj)) { $this->cache_login[evo_strtolower($Obj->login)] =& $Obj; return true; } return false; }
/** * Add object to cache, handling our own indices. * * @param Skin * @return boolean True on add, false if already existing. */ function add(&$Skin) { $this->cache_by_folder[$Skin->folder] =& $Skin; return parent::add($Skin); }
/** * Add a dataobject to the cache */ function add(&$Obj) { if (parent::add($Obj)) { // Successfully added if (!empty($this->subset_property)) { // Also add to subset cache: $this->subset_cache[$Obj->{$this->subset_property}][$Obj->ID] =& $Obj; } return true; } return false; }