Class ocp_tempcode

Description

Located in /sources/tempcode.php (line 793)


	
			
Variable Summary
Method Summary
ocp_tempcode ocp_tempcode ([?array $details = NULL])
void attach (mixed $attach, [boolean $avoid_child_merge = false])
tempcode bind (array &$parameters, ID_TEXT $codename)
void decache ()
string evaluate ([?LANGUAGE_NAME $current_lang = NULL], [mixed $_escape = false], [?integer $up_to = NULL])
string evaluate_echo ([?LANGUAGE_NAME $current_lang = NULL], [mixed $_escape = false])
void from_assembly (string &$raw_data)
boolean from_assembly_executed (PATH $file, array $forced_reload_details)
boolean is_definitely_empty ()
boolean is_empty ()
boolean is_really_empty ()
boolean parameterless (integer $at)
void parse_from (string &$code, integer &$pos, integer &$len)
void singular_bind (string $parameter, tempcode $value)
string to_assembly ()
array __sleep ()
Variables
mixed $cached_output (line 803)
mixed $codename = ':container' (line 801)
mixed $code_to_preexecute (line 795)
mixed $last_attach (line 798)
mixed $preprocessable_bits (line 797)
mixed $pure_lang (line 799)
mixed $seq_parts (line 796)
Methods
Constructor ocp_tempcode (line 810)

Constructor of tempcode

ocp_tempcode ocp_tempcode ([?array $details = NULL])
  • ?array $details: Pair: Code to preexecute, Initialisation seq-parts (NULL: start as empty)
attach (line 937)

Attach the specified tempcode to the right of the current tempcode object.

void attach (mixed $attach, [boolean $avoid_child_merge = false])
  • mixed $attach: The tempcode/string to attach
  • boolean $avoid_child_merge: If we've already merged the children from what we're attaching into the child tree (at bind stage)
bind (line 1239)

Bind the parameter bits, or recursively bind children (doesn't change self, returns a bound tempcode object)

  • return: The new bound tempcode object
tempcode bind (array &$parameters, ID_TEXT $codename)
  • array &$parameters: Map of parameters to bind parameter bits to
  • ID_TEXT $codename: The codename of the template this tempcode is from
decache (line 876)

Decache the object.

void decache ()
evaluate (line 1390)

Parses the current tempcode object, then return the parsed string

  • return: The evaluated thing. Voila, it's all over!
string evaluate ([?LANGUAGE_NAME $current_lang = NULL], [mixed $_escape = false], [?integer $up_to = NULL])
  • ?LANGUAGE_NAME $current_lang: The language to evaluate with (NULL: current user's language)
  • mixed $_escape: Whether to escape the tempcode object (children may be recursively escaped regardless if those children/parents are marked to be)
  • ?integer $up_to: Evaluate at least this much (NULL: evaluate all)
evaluate_echo (line 1322)

Parse the current tempcode object, then echo it to the browser.

  • return: Blank string. Allows chaining within echo statements
string evaluate_echo ([?LANGUAGE_NAME $current_lang = NULL], [mixed $_escape = false])
  • ?LANGUAGE_NAME $current_lang: The language to evaluate with (NULL: current users language)
  • mixed $_escape: Whether to escape the tempcode object (children may be recursively escaped regardless if those children/parents are marked to be)
from_assembly (line 1183)

The opposite of to_assembly - it decodes a tempcode storage representation and turns it into a proper tempcode object.

void from_assembly (string &$raw_data)
  • string &$raw_data: The assembled tempcode
from_assembly_executed (line 1122)

The opposite of to_assembly - it decodes a tempcode storage representation and turns it into a proper tempcode object. This version handles the result of evaled code.

  • return: Success status (it can fail, if the compiled cache file is corrupt)
boolean from_assembly_executed (PATH $file, array $forced_reload_details)
  • PATH $file: The file to load
  • array $forced_reload_details: List of parameters for a forced reload if required
handle_symbol_preprocessing (line 891)

Scan this Tempcode for anything that needs to be symbol-preprocessed

void handle_symbol_preprocessing ()
is_definitely_empty (line 984)

Find whether the current tempcode object is definitely blank, by doing a very quick check.

  • return: Whether the tempcode object is empty
boolean is_definitely_empty ()
is_empty (line 994)

Find whether the current tempcode object is blank or not.

  • return: Whether the tempcode object is empty
boolean is_empty ()
is_really_empty (line 1005)

Tests to see if something would evaluate to blank or not

  • return: Whether it is really empty
boolean is_really_empty ()
parameterless (line 909)

Find whether a variable within this Tempcode is parameterless.

  • return: Whether it is parameterless
boolean parameterless (integer $at)
  • integer $at: Offset to the variable
parse_from (line 921)

Parse a single symbol from an input stream and append it.

void parse_from (string &$code, integer &$pos, integer &$len)
  • string &$code: Code string (input stream)
  • integer &$pos: Start position of input string
  • integer &$len: End position of input string
singular_bind (line 1219)

Replace the named parameter with a specific value. Hardly used, but still important.

void singular_bind (string $parameter, tempcode $value)
  • string $parameter: Named parameter
  • tempcode $value: Specific value
to_assembly (line 1110)

Assemble the current tempcode object into a single serialised (compiled) tempcode storage representation (parameters and certain symbols and not evaluated). The output of the function is language-tied.

  • return: The assembly result
string to_assembly ()
_mark_all_as_escaped (line 1159)

Recursively mark all parameters in this Tempcode as escaped. This is needed when loading from cache, as escape tainting data would have been lost.

void _mark_all_as_escaped ()
__sleep (line 868)

PHP magic function to handle serialisation.

  • return: What is to be serialised
array __sleep ()

Documentation generated on Sun, 02 Jan 2011 23:25:59 +0000 by phpDocumentor 1.4.3