__construct() public method

Creates a new resource.
public __construct ( string | null $path = null )
$path string | null The path of the resource.
 public function __construct($path = null, array $children = array())
 {
     parent::__construct($path);
     foreach ($children as $child) {
         $this->children[$child->getName()] = $child;
     }
     $this->metadata = new TestMetadata();
 }
Esempio n. 2
0
 public function __construct($path = null, $body = self::BODY)
 {
     parent::__construct($path);
     $this->body = $body;
     $this->metadata = new TestMetadata();
 }
 /**
  * Creates a new filesystem resource.
  *
  * @param string      $filesystemPath The path on the file system.
  * @param string|null $path           The repository path of the resource.
  */
 public function __construct($filesystemPath, $path = null)
 {
     parent::__construct($path);
     $this->filesystemPath = $filesystemPath;
 }
Esempio n. 4
0
 /**
  * @param string      $targetPath
  * @param string|null $path
  */
 public function __construct($targetPath, $path = null)
 {
     parent::__construct($path);
     $this->targetPath = $targetPath;
 }
 /**
  * Creates a new filesystem resource.
  *
  * @param string      $filesystemPath The path on the file system.
  * @param string|null $path           The repository path of the resource.
  */
 public function __construct($filesystemPath, $path = null)
 {
     parent::__construct($path);
     $this->filesystemPath = str_replace(DIRECTORY_SEPARATOR, '/', $filesystemPath);
 }