示例#1
0
function PageViewAsText($token)
{
    header('content-type: text/html');
    if ($article = Entities::retrieveEntity($token)) {
        echo '<pre>' . Ascii::generateHTML($article->getContent()) . '</pre>';
    } else {
        echo "No matching article found.";
    }
    exit;
}
示例#2
0
 public function getSumUp()
 {
     $result = Ascii::generateHTML($this->article->getContent());
     return $result;
 }
示例#3
0
 public function setText($aText)
 {
     $this->text .= Ascii::generateHTML($aText);
 }
示例#4
0
    <email>rannou.sebastien@gmail.com</email>
  </author>

  <?php 
foreach (Entities::retrieveGroupedEntities(ARTICLES) as $article) {
    ?>
  <entry>
    <title><?php 
    echo $article->getTitle();
    ?>
</title>
    <link href="<?php 
    echo ROOT_URI . Common::urlFor('view_article', array('token' => $article->getToken()));
    ?>
"/>
    <updated><?php 
    echo date(DATE_ATOM, $article->getTimestamp());
    ?>
</updated>
    <summary type="xhtml"><?php 
    echo substr(Ascii::generateHTML($article->getContent()), 0, 512);
    ?>
...</summary>
  </entry>
  <?php 
}
?>

</feed>
<?php 
exit;