Пример #1
0
 /**
  * Constructor
  *
  * @param ConfigScope effective configuration scope
  * @param ConfigDAO parent object
  * @param string absolute key
  * @param array reference to data
  */
 protected function __construct(ConfigScope $scope, $parent, $key, &$dataPtr)
 {
     $this->data =& $dataPtr;
     $this->scope = $scope;
     $this->fallbackScope = $scope->getFallbackScope();
     $this->parent = $parent;
     $this->key = $key;
 }
Пример #2
0
 /**
  * Constructor
  *
  * @param DibiConnection database connection
  * @param string|null scope name, if null this scope won't perform any load
  * @param ConfigScope|null reference to fallback config scope or null if there isn't one
  */
 function __construct(DibiConnection $dbConnection, $name, $fallback = null)
 {
     $this->db = $dbConnection;
     // Scope name
     if ($name !== null) {
         $this->setScopeName($name);
     }
     parent::__construct($fallback);
 }
Пример #3
0
 public function __construct(array $filenames, $fallback = null)
 {
     foreach ($filenames as $filename) {
         $ext = \pathinfo($filename, PATHINFO_EXTENSION);
         if (\is_file($filename) and \is_readable($filename) and in_array($ext, array('neon', 'ini'))) {
             $this->filenames[] = $filename;
         } else {
             throw new Nette\InvalidArgumentException("Invalid file '{$filename}'.");
         }
     }
     parent::__construct($fallback);
 }