Esempio 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);
 }
Esempio 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);
 }
Esempio n. 3
0
 /**
  * Add a child
  *
  * @param  Node      $child
  * @return Directory
  **/
 public function addChild(Node $child)
 {
     $child->setParent($this);
     $this->children[] = $child;
     return $this;
 }
Esempio 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);
 }