Ejemplo n.º 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)) {
         if ($data = apc_fetch($this->getNamespace() . '-object_' . $offset)) {
             $class = $data['class'];
             $identifier = $data['identifier'];
             //Set the identifier
             parent::offsetSet($offset, $identifier);
             //Set the class
             $this->setClass($offset, $class);
         }
     } else {
         $identifier = parent::offsetGet($offset);
     }
     return $identifier;
 }