2015-07-18 20:52:14 +02:00
|
|
|
<?php namespace Todaymade\Daux\Tree;
|
|
|
|
|
2015-07-18 23:13:02 +02:00
|
|
|
use Todaymade\Daux\Config;
|
|
|
|
|
2015-07-18 20:52:14 +02:00
|
|
|
class Root extends Directory
|
|
|
|
{
|
2015-07-18 23:13:02 +02:00
|
|
|
/** @var Config */
|
|
|
|
protected $config;
|
|
|
|
|
2015-07-18 20:52:14 +02:00
|
|
|
/**
|
|
|
|
* The root doesn't have a parent
|
|
|
|
*
|
2015-07-18 21:23:02 +02:00
|
|
|
* @param string $uri
|
2015-07-18 20:52:14 +02:00
|
|
|
*/
|
2015-07-18 23:13:02 +02:00
|
|
|
public function __construct(Config $config, $uri)
|
2015-07-18 20:52:14 +02:00
|
|
|
{
|
2015-07-18 23:13:02 +02:00
|
|
|
$this->setConfig($config);
|
|
|
|
|
2015-07-18 20:52:14 +02:00
|
|
|
$this->setUri($uri);
|
|
|
|
$this->path = $uri;
|
|
|
|
}
|
2015-07-18 23:13:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Config
|
|
|
|
*/
|
|
|
|
public function getConfig()
|
|
|
|
{
|
|
|
|
return $this->config;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Config $config
|
|
|
|
*/
|
|
|
|
public function setConfig($config)
|
|
|
|
{
|
|
|
|
$this->config = $config;
|
|
|
|
}
|
2015-07-18 20:52:14 +02:00
|
|
|
}
|