示例#1
0
 /**
  * Returns the framework manager for the given class name
  * 
  * @param string $className
  * @return object
  * 
  * @throws \Zepi\Turbo\Exception Cannot find framework manager "{className}".
  */
 protected function getFrameworkManager($className)
 {
     switch ($className) {
         case 'Zepi\\Turbo\\Manager\\DataSourceManager':
             return $this->framework->getDataSourceManager();
             break;
         case 'Zepi\\Turbo\\Manager\\DependencyInjectionManager':
             return $this->framework->getDependencyInjectionManager();
             break;
         case 'Zepi\\Turbo\\Manager\\ModuleManager':
             return $this->framework->getModuleManager();
             break;
         case 'Zepi\\Turbo\\Manager\\RequestManager':
             return $this->framework->getRequestManager();
             break;
         case 'Zepi\\Turbo\\Manager\\RouteManager':
             return $this->framework->getRouteManager();
             break;
         case 'Zepi\\Turbo\\Manager\\RuntimeManager':
             return $this->framework->getRuntimeManager();
             break;
         default:
             throw new Exception('Cannot find framework manager "' . $className . '".');
             break;
     }
 }