Nette\Configurator::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        $this->parameters = $this->getDefaultParameters();
    }

Usage Example

コード例 #1
0
ファイル: Configurator.php プロジェクト: Onset/MangoPress
 /**
  * @param NULL|array $params
  */
 public function __construct(array $params = NULL)
 {
     parent::__construct();
     $this->setTempDirectory(TEMP_DIR);
     $defaults = array_map('realpath', ['appDir' => APP_DIR, 'binDir' => BIN_DIR, 'libsDir' => LIBS_DIR, 'wwwDir' => WWW_DIR, 'logDir' => LOG_DIR, 'configDir' => CONFIG_DIR, 'testsDir' => TESTS_DIR, 'migrationsDir' => MIGRATIONS_DIR]);
     $defaults += ['testMode' => FALSE];
     $this->addParameters((array) $params + $defaults);
     foreach (get_class_methods($this) as $name) {
         if ($pos = strpos($name, 'onInit') === 0 && $name !== 'onInitPackages') {
             $this->onInit[lcfirst(substr($name, $pos + 5))] = [$this, $name];
         }
     }
     foreach (get_class_methods($this) as $name) {
         if ($pos = strpos($name, 'onAfter') === 0) {
             $this->onAfter[lcfirst(substr($name, $pos + 5))] = [$this, $name];
         }
     }
     $this->createRobotLoader()->register();
 }
All Usage Examples Of Nette\Configurator::__construct