Zikula_Core
[ class tree: Zikula_Core ] [ index: Zikula_Core ] [ all elements ]

Class: pnRender

Source Location: /includes/pnRender.class.php

Class Overview

Smarty
   |
   --pnRender

Our class


Variables

Methods


Child classes:

pnFormRender
User interaction handler for pnForm system
Theme
pnTheme

Inherited Variables

Inherited Methods

Class: Smarty

Smarty::Smarty()
The class constructor.
Smarty::append()
appends values to template variables
Smarty::append_by_ref()
appends values to template variables by reference
Smarty::assign()
assigns values to template variables
Smarty::assign_by_ref()
assigns values to template variables by reference
Smarty::clear_all_assign()
clear all the assigned template variables.
Smarty::clear_all_cache()
clear the entire contents of cache (all templates)
Smarty::clear_assign()
clear the given assigned template variable.
Smarty::clear_cache()
clear cached content for the given template and cache id
Smarty::clear_compiled_tpl()
clears compiled version of specified template resource, or all compiled template files if one is not specified.
Smarty::clear_config()
clear configuration values
Smarty::config_load()
load configuration values
Smarty::display()
executes & displays the template results
Smarty::fetch()
executes & returns or displays the template results
Smarty::get_config_vars()
Returns an array containing config variables
Smarty::get_registered_object()
return a reference to a registered object
Smarty::get_template_vars()
Returns an array containing template variables
Smarty::is_cached()
test to see if valid cache exists for this template
Smarty::load_filter()
load a filter of specified type and name
Smarty::register_block()
Registers block function to be used in templates
Smarty::register_compiler_function()
Registers compiler function
Smarty::register_function()
Registers custom function to be used in templates
Smarty::register_modifier()
Registers modifier to be used in templates
Smarty::register_object()
Registers object to be used in templates
Smarty::register_outputfilter()
Registers an output filter function to apply to a template output
Smarty::register_postfilter()
Registers a postfilter function to apply to a compiled template after compilation
Smarty::register_prefilter()
Registers a prefilter function to apply to a template before compiling
Smarty::register_resource()
Registers a resource to fetch a template
Smarty::template_exists()
Checks whether requested template exists.
Smarty::trigger_error()
trigger Smarty error
Smarty::unregister_block()
Unregisters block function
Smarty::unregister_compiler_function()
Unregisters compiler function
Smarty::unregister_function()
Unregisters custom function
Smarty::unregister_modifier()
Unregisters modifier
Smarty::unregister_object()
Unregisters object
Smarty::unregister_outputfilter()
Unregisters an outputfilter function
Smarty::unregister_postfilter()
Unregisters a postfilter function
Smarty::unregister_prefilter()
Unregisters a prefilter function
Smarty::unregister_resource()
Unregisters a resource
Smarty::_compile_resource()
compile the template
Smarty::_compile_source()
compile the given source
Smarty::_dequote()
Remove starting and ending quotes from the string
Smarty::_eval()
wrapper for eval() retaining $this
Smarty::_fetch_resource_info()
fetch the template info. Gets timestamp, and source if get_source is true
Smarty::_get_auto_filename()
get a concrete filename for automagically created content
Smarty::_get_auto_id()
returns an auto_id for auto-file-functions
Smarty::_get_compile_path()
Get the compile path for this resource
Smarty::_get_filter_name()
Extracts the filter name from the given callback
Smarty::_get_plugin_filepath()
get filepath of requested plugin
Smarty::_include()
wrapper for include() retaining $this
Smarty::_is_compiled()
test if resource needs compiling
Smarty::_parse_resource_name()
parse out the type and name from the resource
Smarty::_process_compiled_include_callback()
callback function for preg_replace, to call a non-cacheable block
Smarty::_read_file()
read in a file
Smarty::_run_mod_handler()
Handle modifiers
Smarty::_smarty_cache_attrs()
get or set an array of cached attributes for function that is
Smarty::_smarty_include()
called for included templates
Smarty::_trigger_fatal_error()
trigger Smarty plugin error
Smarty::_unlink()
unlink a file, possibly using expiration time

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()


Overrides Smarty::clear_all_cache() (clear the entire contents of cache (all templates))

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...




Overrides Smarty::clear_cache() (clear cached content for the given template and cache id)

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.




Overrides Smarty::display() (executes & displays the template results)

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


Overrides Smarty::fetch() (executes & returns or displays the template results)

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...




Overrides Smarty::is_cached() (test to see if valid cache exists for this template)

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.



Overrides Smarty::template_exists() (Checks whether requested template exists.)

Parameters:

string   $template  

[ Top ]


Documentation generated on Fri, 18 Jul 2008 21:54:11 +0200 by phpDocumentor 1.4.1