Пример #1
0
 /**
  * Set an item in the array
  *
  * @param   int     $offset The offset of the item
  * @param   mixed   $value  The item's value
  * @return  object  ObjectRegistryCache
  */
 public function offsetSet($offset, $identifier)
 {
     if ($identifier instanceof ObjectIdentifierInterface) {
         $data = array('identifier' => $identifier, 'class' => $this->getClass($identifier));
         apc_store($this->getNamespace() . '-object_' . $offset, $data);
     }
     parent::offsetSet($offset, $identifier);
 }
Пример #2
0
 /**
  * Set an item in the array
  *
  * @param   int     $offset The offset of the item
  * @param   mixed   $value  The item's value
  * @return  object  ObjectRegistryCache
  */
 public function offsetSet($offset, $value)
 {
     apc_store($this->_namespace . '-' . $offset, serialize($value));
     parent::offsetSet($offset, $value);
 }