setName($container); self::$_instance[$container]->setup(); } return self::$_instance[$container]; } public function setName($name) { $this->_name = $name; } public function name() { return $this->_name; } /** * @return Pd_Container_Maps */ public function maps() { return $this->_maps; } /** * @return Pd_Container_Dependencies */ public function dependencies() { return $this->_dependencies; } /** * Sets up the container by creating a new map * and dependency holder. This function doesn't really * need to ever be called, since the get() function * calls it when creating a 'new' container. */ public function setup() { $this->_maps = new Pd_Container_Maps(); $this->_dependencies = new Pd_Container_Dependencies(); } private function __construct() { // prevent direct instanciation } private function __clone() { // prevent cloning } } ?>