Render method

Render buffered view content into browser. The buffered view method generated or process from buffered view methods. This method should called in the last of method controller class.

If the constructor method is missed, you maybe get blank result.

Basic Usage

The basic usage for render method is:

$this->render([int $cacheable=0]): void

Parameters

Render method has 1 optional parameters it is cacheable.

$cacheable

This parameter value allowed the buffered view cached with expected time value in second(s).

Example Usage

Here is the full example:

<?php
class Blog extends SENE_Controller {
  public function __construct(){
    parent::__construct();
  }
  public function index(){
    $data = array();
    $data['example'] = 'this is example';
    $this->setTitle('Blog home');
    $this->putThemeContent("blog/home",$data);
    $this->putJsContent('blog/home_bottom',$data);
    $this->loadLayout('col-1',$data);
    $this->render();
  }
}

The putThemeContent, putJsContent, and loadLayout method(s) has ability for buffered the html view.