public __construct ( string $name, Horde_Pear_Package_Xml_Element_Directory $parent = null ) | ||
$name | string | The name of the directory. |
$parent | Horde_Pear_Package_Xml_Element_Directory | The parent directory. |
public function __construct($name, $parent = null)
{
$this->_name = $name;
if ($parent instanceof Horde_Pear_Package_Xml_Element_Directory) {
$this->_xml = $parent->getDocument();
$this->_path = $parent->getPath() . '/' . $name;
$this->_level = $parent->getLevel() + 1;
} else {
$this->_path = '';
$this->_level = 1;
}
}