Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs For Class pnRender

Class: pnRender

Source Location: /pnRender.class.php

Class Overview

Smarty
   |
   --pnRender

Our class

Variables

Methods


Child classes:

Theme
pnTheme

Inherited Variables

Inherited Methods


Class Details

[line 45] Our class



[ Top ]

Class Variables

$baseuri =

[line 84]

The base URI of the site



Type:   mixed
[ Top ]

$baseurl =

[line 79]

The base URL of the site



Type:   mixed
[ Top ]

$cache_id =

[line 89]

The cache ID of the object



Type:   mixed
[ Top ]

$expose_template =

[line 99]

true if admins wants to expose the template folder, needs admin rights for pnRender too



Type:   mixed
[ Top ]

$language =

[line 74]

The current language used by the site/user



Type:   mixed
[ Top ]

$modinfo =

[line 59]

The full module info for wich the object is for



Type:   mixed
[ Top ]

$module =

[line 49]

The module in which the current template will be located



Type:   mixed
[ Top ]

$theme =

[line 64]

The current theme used by the site/user



Type:   mixed
[ Top ]

$themeinfo =

[line 69]

The full theme info for the theme used by the site/user



Type:   mixed
[ Top ]

$toplevelmodule =

[line 54]

The primary module for this page



Type:   mixed
[ Top ]

$userdb =

[line 94]

Set if Xanthia is an active module and templates stored in database



Type:   mixed
[ Top ]

Class Methods


constructor pnRender [line 108]

pnRender pnRender( [string $module = ''], [bool $caching = null])

The class constructor.





Parameters:

string   $module   The module for which this object is for
bool   $caching   (optional) Value for the caching class var - default is void (i.e. use admin configured value

[ Top ]

method add_core_data [line 564]

boolean add_core_data( list 0)

add core data to the template

This function adds some basic data to the template depending on the current user and the PN settings.




Tags:

return:  true if ok, otherwise false
access:  public


Parameters:

list   0   of module names. all mod vars of these modules will be included too The mod vars of the current module will always be included

[ Top ]

method clear_all_cache [line 509]

boolean clear_all_cache( [string $exp_time = null])

clear the entire contents of cache (all templates)

Smarty's original clear_all_cache function calls the subclasse's clear_cache function. As we always prepend the module name, this doesn't work here...




Tags:

return:  results of smarty_core_rm_auto()


Parameters:

string   $exp_time   expire time

[ Top ]

method clear_cache [line 488]

boolean clear_cache( [string $template = null], [string $cache_id = null], [string $compile_id = null], [string $expire = null])

clears the cache for a specific template

This returns true if there is a valid cache for this template. Right now, we are just passing it to the original Smarty function. We might introduce a function to decide if the cache is in need to be refreshed...






Parameters:

string   $template   the name of the template
string   $cache_id   (optional) the cache ID
string   $compile_id   (optional) the compile ID
string   $expire   (optional) minimum age in sec. the cache file must be before it will get cleared.

[ Top ]

method display [line 436]

void display( string $template, [string $cache_id = null], [string $compile_id = null])

executes & displays the template results

This displays the template. Supply a valid template name. As an optional second parameter, you can pass a cache id. As an optional third parameter, you can pass a compile id.






Parameters:

string   $template   the name of the template
string   $cache_id   (optional) the cache ID
string   $compile_id   (optional) the compile ID

[ Top ]

method fetch [line 396]

string fetch( string $template, [string $cache_id = null], [string $compile_id = null], [boolean $display = false], [boolean $reset = true])

executes & returns the template results

This returns the template output instead of displaying it. Supply a valid template name. As an optional second parameter, you can pass a cache id. As an optional third parameter, you can pass a compile id.




Tags:

return:  the template output


Parameters:

string   $template   the name of the template
string   $cache_id   (optional) the cache ID
string   $compile_id   (optional) the compile ID
boolean   $display  
boolean   $reset   (optional) reset singleton defaults

[ Top ]

method getInstance [line 258]

void getInstance( [ $module = null], [ $caching = null], [ $cache_id = null], [ $add_core_data = false])

setup the current instance of the pnRender class and return it back to the module





Parameters:

   $module  
   $caching  
   $cache_id  
   $add_core_data  

[ Top ]

method get_template_path [line 302]

void get_template_path( string $template)

Checks which path to use for required template





Overridden in child classes as:

Theme::get_template_path()
Checks which path to use for required template

Parameters:

string   $template  

[ Top ]

method is_cached [line 453]

boolean is_cached( string $template, [string $cache_id = null], [ $compile_id = null])

finds out if a template is already cached

This returns true if there is a valid cache for this template. Right now, we are just passing it to the original Smarty function. We might introduce a function to decide if the cache is in need to be refreshed...






Parameters:

string   $template   the name of the template
string   $cache_id   (optional) the cache ID
   $compile_id  

[ Top ]

method template_exists [line 292]

void template_exists( string $template)

Checks whether requested template exists.





Parameters:

string   $template  

[ Top ]

Packages:

Files:

Classes: