Back to Document class

Method render

public string
render
(mixed $cache = false, mixed $params = array())
Outputs the document
Parameters
  • bool $cache If true, cache the output
  • array $params Associative array of attributes
Returns
  • string The rendered data
Since
  • 1.7.0
Class: Document
Project: Joomla

Method render - Source code

/**
 * Outputs the document
 *
 * @param   boolean  $cache   If true, cache the output
 * @param   array    $params  Associative array of attributes
 *
 * @return  string  The rendered data
 *
 * @since   1.7.0
 */
public function render($cache = false, $params = array())
{
    $app = CmsFactory::getApplication();
    if ($mdate = $this->getModifiedDate()) {
        if (!$mdate instanceof Date) {
            $mdate = new Date($mdate);
        }
        $app->modifiedDate = $mdate;
    }
    $app->mimeType = $this->_mime;
    $app->charSet = $this->_charset;
    // Handle preloading for configured assets in web applications
    if ($app instanceof AbstractWebApplication) {
        $this->preloadAssets();
    }
    return '';
}
OSZAR »