Exemplo n.º 1
0
 /**
  * Constructor
  *
  * @param  string $name
  * @param  int    $mode mode in octal (0XXX)
  * @return void
  **/
 public function __construct($name, $mode = null)
 {
     parent::__construct($name);
     $this->setMode($mode);
 }
Exemplo n.º 2
0
 /**
  * Constructor
  *
  * @param  string $from endpoint (what the link points to)
  * @param  string $to   used as $name for Node
  * @return void
  **/
 public function __construct($from, $to)
 {
     parent::__construct($to);
     $this->setEndpoint($from);
 }
Exemplo n.º 3
0
 /**
  * Add a child
  *
  * @param  Node      $child
  * @return Directory
  **/
 public function addChild(Node $child)
 {
     $child->setParent($this);
     $this->children[] = $child;
     return $this;
 }
Exemplo n.º 4
0
 /**
  * Get the full path to a node, including the root path
  *
  * @see getRoot()
  *
  * @param  Node   $node
  * @return string
  **/
 private function getNodePath(Node $node)
 {
     return $this->getRoot() . DIRECTORY_SEPARATOR . trim($node->getFullName(DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
 }