Refactor the tree system

Each element of the tree now only has one parent, not a parent array.

- Creating an elements doesn't necessarily rely on an existing file
- Moving elements unregisters elements from the previous parent
- Moved some helpers to the builder instead of Entry
This commit is contained in:
Stéphane Goetz
2015-07-18 20:52:14 +02:00
parent 3235c49acd
commit aa5602a0fb
7 changed files with 210 additions and 134 deletions

15
libs/Tree/Root.php Normal file
View File

@ -0,0 +1,15 @@
<?php namespace Todaymade\Daux\Tree;
class Root extends Directory
{
/**
* The root doesn't have a parent
*
* @param Directory $uri
*/
public function __construct($uri)
{
$this->setUri($uri);
$this->path = $uri;
}
}