name = $name; $this->children = array(); } public function getName () { return $this->name; } public function getSize () { $size = 0; foreach ($this->children as $entry) { $size += $entry->getSize(); } return $size; } public function getChildren () { return $this->children; } public function add (FSElement $entry) { array_push($this->children, $entry); return $this; } public function accept (Visitor $v) { $v->visit($this); } }