예제 #1
0
 /**
  * alternative constructor
  *
  * @return void
  *
  * @throws \Exception
  */
 public function init()
 {
     // inject classes
     $this->manager = $this->objectManager->getInstance('\\Noa\\Interfaces\\ConfigurationManagerInterface');
     $this->request = $this->objectManager->getInstance('\\Noa\\Core\\Http\\Request');
     $this->response = $this->objectManager->getInstance('\\Noa\\Core\\Http\\Response');
     $this->sessionPath = $this->manager->getSessionPath();
 }
예제 #2
0
파일: Manager.php 프로젝트: dittertp/noa
 /**
  * returns existing class instance
  *
  * @param string $class the class name
  *
  * @return mixed
  */
 protected function inject($class)
 {
     return $this->objectManager->getInstance($class);
 }
예제 #3
0
 /**
  * returns existing class instance
  *
  * @param string $class     the class name
  * @param array  $arguments optional class arguments
  *
  * @return mixed
  */
 protected function inject($class, $arguments = array())
 {
     $class = $this->objectManager->getInstance($class);
     return $class;
 }
예제 #4
0
 /**
  * Returns teh SessionHandler instance
  *
  * @return DefaultSessionHandler
  */
 protected function getCurrentSessionHandler()
 {
     $sessionHandlerClass = $this->manager->getSessionHandler();
     $className = self::HANDLER_NAMESPACE . $sessionHandlerClass;
     return $this->objectManager->getInstance($className);
 }