Ejemplo n.º 1
0
function list_action()
{
    $postModel = new PostModel();
    $posts = $postModel->get_all_posts();
    $html = render_template("view/templates/list.php", array('posts' => $posts));
    return new Response($html);
}
Ejemplo n.º 2
0
/**
* massiv $posts soderzhit vyborku vseh polej iz tablicy post
* podgruzhajet file list.php ,soderzhashij vid vyvoda inform iz $posts v browsere
*/
function list_action()
{
    $model = new PostModel();
    $posts = $model->get_all_posts();
    $html = render_template('View/Templates/list.php', array('posts' => $posts));
    return $html;
    // reguire "View/Templates/list.php";
    //jesli ne vypolnitsja budet oshibka. Zagruzajet list.php
}