コード例 #1
0
 public function __construct($folderOrFilePath, $children = [])
 {
     parent::__construct($children);
     $this->folderOrFilePath = rtrim($folderOrFilePath, "/");
     if (!file_exists($this->folderOrFilePath)) {
         throw new StaticResourceNotFoundException($this->folderOrFilePath);
     }
     if (is_dir($this->folderOrFilePath)) {
         $this->isFolder = true;
     }
 }
コード例 #2
0
 public function __construct($modelName, $children = [])
 {
     $this->modelName = $modelName;
     parent::__construct($children);
 }
コード例 #3
0
 public function __construct(LoginProvider $loginProvider, $loginUrl, $children = [])
 {
     $this->loginProvider = $loginProvider;
     $this->loginUrl = $loginUrl;
     parent::__construct($children);
 }
コード例 #4
0
 /**
  * @param string $namespace The corresponding namespace prefix to use. This should have no leading or trailing slash.
  * @param array $children
  */
 public function __construct($namespace = "Site", $children = [])
 {
     parent::__construct($children);
     $this->namespace = trim($namespace, "\\");
 }