get_render() public method

Returns the contents of a rendered template.
See also: self::render()
public get_render ( string $tpl, array $data = [] ) : string
$tpl string
$data array
return string
Ejemplo n.º 1
0
 /**
  * Renders & returns a template file.
  * 
  * @param string $tpl
  * @param array $data
  * @return string
  */
 function get_render($tpl, $data = array())
 {
     $tpl = HOOKR_PLUGIN_DIR . DS . 'tpl' . DS . $tpl;
     return parent::get_render($tpl, $data);
 }
Ejemplo n.º 2
0
 /**
  * Renders & returns a template file.
  * 
  * @param string $tpl
  * @param array $data
  * @return string
  */
 function get_render($tpl, $data = array())
 {
     ob_start();
     $tpl = HOOKR_PLUGIN_DIR . DS . 'tpl' . DS . $tpl;
     parent::get_render($tpl, $data);
     return ob_get_clean();
 }