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:
15
libs/Tree/Root.php
Normal file
15
libs/Tree/Root.php
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user