45 if (!($child instanceof
INode))
throw new Exception(
'Only instances of Sabre\DAV\INode are allowed to be passed in the children argument');
60 $this->children[$child->
getName()] = $child;
90 if (isset($this->children[
$name]))
return $this->children[
$name];
102 return array_values($this->children);
An exception for terminatinating execution or to throw for unit testing.
addChild(INode $child)
Adds a new childnode to this collection.
getChildren()
Returns a list of children for this collection.
getName()
Returns the name of the collection.
getChild($name)
Returns a child object, by its name.
__construct($name, array $children=[])
Creates this node.
The INode interface is the base interface, and the parent class of both ICollection and IFile.
getName()
Returns the name of the node.