/** * Constructor. */ public function __construct(FajrConfig $config) { $this->config = $config; $this->serverManager = ServerManager::getInstance(); $this->router = Router::getInstance(); $this->displayManager = DisplayManager::getInstance(); }
public static function getInstance() { if (!isset(self::$instance)) { $server = ServerManager::getInstance()->getActiveServer(); switch ($server->getBackendType()) { case ServerConfig::BACKEND_FAKE: self::$instance = new FakeBackendFactory(SessionStorageProvider::getInstance()); break; case ServerConfig::BACKEND_LIBFAJR: self::$instance = new LibfajrBackendFactory(LazyServerConnection::getInstance()); break; default: assert(false); } } return self::$instance; }
public static function getInstance() { return new LoginController(FajrConfigLoader::getConfiguration(), LoginManager::getInstance(), ServerManager::getInstance(), SessionStorageProvider::getInstance(), DisplayManager::getInstance(), Router::getInstance()); }