. * */ /** * This class models a folder that contains feeds. */ class OC_News_Folder { private $name; private $id; private $feeds; private $children; private $parent; public function __construct($name, $parent = null){ $this->name = $name; $this->parent = $parent; $this->feeds = array(); $this->id = 0; } public function getName(){ return $this->name; } public function setName($name){ $this->name = $name; } public function getId(){ return $this->id; } public function setId($id){ $this->id = $id; } public function getParentId(){ if ($this->parent == null){ return 0; } return $this->parent->getId(); } public function addFeed(OC_News_Feed $feed){ $this->feeds[] = $feed; } }