/** * $p = [ * 'nodeId' => 1, // the ID of the Directory * 'parentDir' => null, // the reference to the parentDirectory object * 'level' => 0..n * ]; * * $env = [ * 'mode' => edit | browse * 'nodeId' => 18232 // directly edit this node if mode=edit * ] */ public function __construct($path, $p = null, $env = null) { $this->path = $path; $this->nodeId = $p['nodeId']; $this->parentDir = $p['parentDir']; $this->env = $env; // a direct request for a File? $fileId = $env['mode'] == 'edit' ? $fileId = $env['nodeId'] : ($fileId = null); $this->content = Utils::getChildren($this->nodeId, $this->path, $env, $fileId); // fully loading the CB Node for Directory $this->cbNode = Utils::getNodeById($this->nodeId); // error_log("WebDAV/Directory.construct(" . $path . ")"); }