Beispiel #1
0
 /**
  * Get an item from the array by offset
  *
  * @param   int     $offset The offset
  * @return  mixed   The item from the array
  */
 public function offsetGet($offset)
 {
     if (!parent::offsetExists($offset)) {
         $result = apc_fetch($this->_namespace . '-' . $offset);
     } else {
         $result = parent::offsetGet($offset);
     }
     return $result;
 }
Beispiel #2
0
 /**
  * Get an item from the array by offset
  *
  * @param   int     $offset The offset
  * @return  mixed   The item from the array
  */
 public function offsetGet($offset)
 {
     if (!parent::offsetExists($offset)) {
         if ($result = apc_fetch($this->getNamespace() . '-class_' . $offset)) {
             parent::offsetSet($offset, $result);
         }
     } else {
         $result = parent::offsetGet($offset);
     }
     return $result;
 }