Esempio n. 1
0
 /**
  * Retrieve cached object instance
  *
  * @param string $type
  * @return mixed
  */
 public function get($type)
 {
     $type = $this->_config->getPreference($type);
     if (!isset($this->_sharedInstances[$type])) {
         $this->_sharedInstances[$type] = $this->_factory->create($type);
     }
     return $this->_sharedInstances[$type];
 }