コード例 #1
0
 private function getVerisonsRepresentations()
 {
     $representations = array();
     $wiki_version_dao = new WikiVersionDao();
     $wiki_version_factory = new WikiPageVersionFactory();
     foreach ($wiki_version_dao->getAllVersionForGivenPage($this->id) as $version) {
         $page_version = $wiki_version_factory->getInstanceFromRow($version);
         $page_version_representation = new PhpWikiPageVersionRepresentation();
         $page_version_representation->build($page_version);
         $representations[] = $page_version_representation;
     }
     return $representations;
 }
 public function build(WikiPage $wiki_page, WikiPageVersion $version)
 {
     parent::build($version);
     $this->wiki_content = $version->getContent();
     $this->formatted_content = $version->getFormattedContent($wiki_page);
 }