C_Image_Wrapper_Collection

The NextGEN Gallery C Image Wrapper Collection class.

Defined (1)

The class is defined in the following location(s).

/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php  
  1. class C_Image_Wrapper_Collection implements ArrayAccess 
  2. public $container = array(); 
  3. public $galleries = array(); 
  4. public function offsetExists($offset) 
  5. return isset($this->container[$offset]); 
  6. public function offsetGet($offset) 
  7. return isset($this->container[$offset]) ? $this->container[$offset] : null; 
  8. public function offsetSet($offset, $value) 
  9. if (is_object($value)) { 
  10. $value->container = $this; 
  11. if (is_null($offset)) { 
  12. $this->container[] = $value; 
  13. } else { 
  14. $this->container[$offset] = $value; 
  15. public function offsetUnset($offset) 
  16. unset($this->container[$offset]); 
  17. /** 
  18. * Retrieves and caches an I_Gallery_Mapper instance for this gallery id 
  19. * @param int $gallery_id Gallery ID 
  20. * @return mixed 
  21. */ 
  22. public function get_gallery($gallery_id) 
  23. if (!isset($this->galleries[$gallery_id]) || is_null($this->galleries[$gallery_id])) { 
  24. $this->galleries[$gallery_id] = C_Gallery_Mapper::get_instance(); 
  25. return $this->galleries[$gallery_id];