_fields = array( '_tag' => 'tag', '_posts' => 'posts'); parent::__construct($dom); // filter fields $this->_tag = (string) $this->_tag; $this->_posts = (int) $this->_posts; } /** * Returns the tag name. * * @return string */ public function getTag() { return $this->_tag; } /** * Returns the number of posts. * * @return int */ public function getPosts() { return $this->_posts; } }