Beispiel #1
0
 /**
  * Initializes and return an instance of the given class name.
  * 
  * @access public
  * @param string $className
  * @return mixed
  */
 public function getInstance($className)
 {
     switch ($className) {
         case '\\Zepi\\Core\\Utils\\Manager\\ConfigurationManager':
             if ($this->configurationManager === null) {
                 $path = $this->framework->getRootDirectory() . '/config/framework.json';
                 $configFileBackend = new \Zepi\Core\Utils\Backend\ConfigurationFileBackend($path);
                 $this->configurationManager = $this->framework->initiateObject($className, array('configurationFileBackend' => $configFileBackend));
                 $this->configurationManager->loadConfigurationFile();
             }
             return $this->configurationManager;
             break;
         default:
             return $this->framework->initiateObject($className);
             break;
     }
 }