Beispiel #1
0
 /**
  * Setting up application platform, fixing magic quotes gpc, initializing autoloader and N2Request
  *
  * @param $app N2Application
  * @param $appTypePath
  */
 public function __construct($app, $appTypePath)
 {
     $this->identifier = $app->name . '.' . $this->type;
     N2Loader::addPath($this->identifier, $appTypePath);
     $this->app = $app;
     $this->router = $app->router;
     $this->path = $appTypePath;
     $this->autoload();
 }
Beispiel #2
0
 public function __construct()
 {
     N2Loader::addPath($this->getName(), $this->getPath());
     $platformPath = N2Filesystem::realpath($this->getPath() . '/../' . N2Platform::getPlatform());
     if ($platformPath) {
         N2Loader::addPath($this->getName() . '.platform', $platformPath);
     }
     $this->loadLocale();
     $filterClass = 'N2' . ucfirst($this->getName()) . 'ApplicationInfoFilter';
     N2Loader::import($filterClass, $this->getName() . '.platform');
     $callable = $filterClass . '::filter';
     if (is_callable($callable)) {
         call_user_func($filterClass . '::filter', $this);
     }
     if (N2Base::$isReady) {
         $this->onNextendBaseReady();
     } else {
         N2Pluggable::addAction('nextendBaseReady', array($this, 'onNextendBaseReady'));
     }
 }