Files
DomFramework/examples/blog/views/view_blog.php
2014-03-24 19:44:34 +00:00

31 lines
666 B
PHP

<?php
/** DomFramework Blog
@package domframework-blog
@author Dominique Fournier <dominique@fournier38.fr> */
/** Display the articles of the blog */
class view_blog
{
/** Return the datas
@param array $data The list of titles */
function get ($data)
{
return $data;
}
/** Display the list of titles
@param array $data The list of titles */
function listing ($data)
{
$content = "<ul>\n";
foreach ($data as $val)
{
$content .= " <li>";
$content .= "<a href='".urlencode ($val)."'>".htmlentities ($val)."</a>";
$content .= "</li>\n";
}
$content .= "</ul>\n";
return $content;
}
}