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

Procedural File: template.class.php

Source Location: /system/classes/template.class.php



Classes:

Template
The template class allows you to keep your HTML code in some external files which are completely free of PHP code, but contain replacement fields.


Page Details:









CACHE_check_instance [line 2102]

string|false CACHE_check_instance( string $iid, [boolean $bypass_lang = false], [ $bypass_mobile = false])

**************************************************************************** Finds a cached copy of the referenced data.

usage: $data = CACHE_check_instance($iid, $bypass_lang) if (!$data === false) { // generate the data $data = 'stuff'; CACHE_create_instance($iid, $data, $bypass_lang); } // use the data

The caching functions only work with strings. If you want to store structures you must serialize/unserialize the data yourself:

$data = CACHE_check_instance($iid); if ($data === false) { $data = new SomeObj(); CACHE_create_instance($iid, serialize($data)); } else { $data = unserialize($data); } // use the object




Tags:

return:  the data string or false is there is no such instance
see:  CACHE_check_instance(), CACHE_remove_instance()
access:  public


Parameters

string   $iid   A globally unique instance identifier.
boolean   $bypass_lang   If true, the cached data is not instanced by language
   $bypass_mobile  
[ Top ]



CACHE_cleanup_plugin [line 2002]

void CACHE_cleanup_plugin( $plugin $plugin)

**************************************************************************** Removes all cached files associated with a plugin.

usage: CACHE_cleanup_plugin($plugin);




Tags:

access:  public


Parameters

$plugin   $plugin   String containing the plugin's name
[ Top ]



CACHE_create_instance [line 2051]

void CACHE_create_instance( string $iid, string $data, [boolean $bypass_lang = false], [ $bypass_mobile = false])

**************************************************************************** Creates a cached copy of the data passed.

usage: CACHE_create_instance($iid, $data, $bypass_lang);




Tags:

see:  CACHE_check_instance(), CACHE_remove_instance()
access:  public


Parameters

string   $iid   A globally unique instance identifier.
string   $data   The data to cache
boolean   $bypass_lang   If true, the cached data is not instanced by language
   $bypass_mobile  
[ Top ]



CACHE_get_instance_update [line 2123]

int CACHE_get_instance_update( string $iid, [boolean $bypass_lang = false], [ $bypass_mobile = false])

**************************************************************************** Returns the time when the referenced instance was generated.

usage: $time = CACHE_get_instance_update($iid, $bypass_lang = false)




Tags:

return:  unix_timestamp of when the instance was generated or false
see:  CACHE_check_instance(), CACHE_remove_instance()
access:  public


Parameters

string   $iid   A globally unique instance identifier.
boolean   $bypass_lang   If true, the cached data is not instanced by language
   $bypass_mobile  
[ Top ]



CACHE_instance_filename [line 2141]

int CACHE_instance_filename( string $iid, [boolean $bypass_lang = false], [ $bypass_mobile = false])

**************************************************************************** Generates a full path to the instance file. Should really only be used internally but there are probably reasons to use it externally.

usage: $time = CACHE_instance_filename($iid, $bypass_lang = false)




Tags:

return:  unix_timestamp of when the instance was generated or false
see:  CACHE_create_instance(), CACHE_check_instance(), CACHE_remove_instance()
access:  public


Parameters

string   $iid   A globally unique instance identifier.
boolean   $bypass_lang   If true, the cached data is not instanced by language
   $bypass_mobile  
[ Top ]



CACHE_remove_instance [line 2024]

void CACHE_remove_instance( string $iid)

**************************************************************************** Deletes an instance of the specified instance identifier

usage: CACHE_remove_instance($iid, $glob);




Tags:

see:  check_instance, create_instance
access:  public


Parameters

string   $iid   A globally unique instance identifier.
[ Top ]



CACHE_security_hash [line 2173]

string CACHE_security_hash( )

**************************************************************************** Generates a hash based on the current user's security profile.

Currently that is just a list of groups the user is a member of but if additional data is found to be necessary for creating a unique security profile, this centralized function would be the place for it.

usage: $hash = CACHE_security_hash() $instance = "someData__$someId__$hash"; CACHE_create_instance($instance, $theData);




Tags:

return:  a string uniquely identifying the user's security profile
access:  public


[ Top ]



Documentation generated on Sun, 02 Oct 2016 07:56:09 +0000 by phpDocumentor 1.4.3