Puli\Repository\Resource\GenericResource::__construct PHP Method

__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)
    {
        $this->path = $path;
        $this->repoPath = $path;
    }

Usage Example

 public function __construct($path = null, array $children = array())
 {
     parent::__construct($path);
     foreach ($children as $child) {
         $this->children[$child->getName()] = $child;
     }
     $this->metadata = new TestMetadata();
 }
All Usage Examples Of Puli\Repository\Resource\GenericResource::__construct