application_name = ''; $this->session_segment_name = null; $this->basePath = null; $this->templatePath = null; $this->languagePath = null; $this->temporaryPath = null; $this->filesystemBase = null; $this->sqlPath = null; parent::__construct($values); // Application service if (!isset($this['application'])) { $this['application'] = function (Container $c) { return Application::getInstance($c->application_name, $c); }; } // Application Configuration service if (!isset($this['appConfig'])) { $this['appConfig'] = function (Container $c) { return new \Awf\Application\Configuration($c); }; } // Database Driver service if (!isset($this['db'])) { $this['db'] = function (Container $c) { return Driver::getInstance($c); }; } // Application Dispatcher service if (!isset($this['dispatcher'])) { $this['dispatcher'] = function (Container $c) { $className = '\\' . ucfirst($c->application_name) . '\Dispatcher'; if (!class_exists($className)) { $className = '\Awf\Dispatcher\Dispatcher'; } return new $className($c); }; } // Application Event Dispatcher service if (!isset($this['eventDispatcher'])) { $this['eventDispatcher'] = function (Container $c) { return new \Awf\Event\Dispatcher($c); }; } // Filesystem Abstraction Layer service if (!isset($this['fileSystem'])) { $this['fileSystem'] = function (Container $c) { return \Awf\Filesystem\Factory::getAdapter($c, true); }; } // Input Access service if (!isset($this['input'])) { $this['input'] = function (Container $c) { return new \Awf\Input\Input(); }; } // Mailer Object service if (!isset($this['mailer'])) { $this['mailer'] = $this->factory(function (Container $c) { return new \Awf\Mailer\Mailer($c); }); } // Application Router service if (!isset($this['router'])) { $this['router'] = function (Container $c) { return new \Awf\Router\Router($c); }; } // Session Manager service if (!isset($this['session'])) { $this['session'] = function () { return new Session\Manager( new Session\SegmentFactory, new Session\CsrfTokenFactory( new Session\Randval( new Phpfunc() ) ), $_COOKIE ); }; } // Application Session Segment service if (!isset($this['segment'])) { $this['segment'] = function (Container $c) { if (empty($c->session_segment_name)) { $c->session_segment_name = 'Akeeba\\Awf\\' . $c->application_name; } return $c->session->newSegment($c->session_segment_name); }; } // User Manager service if (!isset($this['userManager'])) { $this['userManager'] = function (Container $c) { return new \Awf\User\Manager($c); }; } } }