From b69fca14e76a2f5db0cd0924fe5e7056e94771b1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 26 Feb 2013 15:49:37 -0800 Subject: initial doco --- doc/html/classTemplate.html | 643 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 643 insertions(+) create mode 100644 doc/html/classTemplate.html (limited to 'doc/html/classTemplate.html') diff --git a/doc/html/classTemplate.html b/doc/html/classTemplate.html new file mode 100644 index 000000000..849127e2e --- /dev/null +++ b/doc/html/classTemplate.html @@ -0,0 +1,643 @@ + + + + + + +The Red Project: Template Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
The Red Project +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ + +
+ + + + +

+Public Member Functions

 replace ($s, $r)
 
+ + + + + + + + + + + + + + + + + + + +

+Public Attributes

 $r
 
 $search
 
 $replace
 
 $stack = array()
 
 $nodes = array()
 
 $done = false
 
 $d = false
 
 $lang = null
 
 $debug =false
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Private Member Functions

 _preg_error ()
 
 _push_stack ()
 
 _pop_stack ()
 
 _get_var ($name, $retNoKey=false)
 
 _replcb_if ($args)
 
 _replcb_for ($args)
 
 _replcb_inc ($args)
 
 _replcb_debug ($args)
 
 _replcb_node ($m)
 
 _replcb ($m)
 
 _build_nodes ($s)
 
 var_replace ($s)
 
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
Template::_build_nodes ( $s)
+
+private
+
+ +

Referenced by replace().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Template::_get_var ( $name,
 $retNoKey = false 
)
+
+private
+
+
+ +
+
+ + + + + +
+ + + + + + + +
Template::_pop_stack ()
+
+private
+
+ +

Referenced by _replcb_for(), and _replcb_inc().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
Template::_preg_error ()
+
+private
+
+ +

Referenced by _build_nodes(), and replace().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
Template::_push_stack ()
+
+private
+
+ +

Referenced by _replcb_for(), and _replcb_inc().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Template::_replcb ( $m)
+
+private
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Template::_replcb_debug ( $args)
+
+private
+
+

DEBUG node

+

{{ debug $var [$var [$var [...]]] }}{{ enddebug }}

+

replace node with

+
var_dump($var, $var, ...);
+
+
+ +
+
+ + + + + +
+ + + + + + + + +
Template::_replcb_for ( $args)
+
+private
+
+

FOR node

+

{{ for < $var>=""> as $name }}...{{ endfor }} {{ for < $var>=""> as $key=>$name }}...{{ endfor }}

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Template::_replcb_if ( $args)
+
+private
+
+

IF node

+

{{ if < $var>=""> }}...[{{ else }} ...] {{ endif }} {{ if < $var>="">==<val|$var> }}...[{{ else }} ...]{{ endif }} {{ if < $var>="">!=<val|$var> }}...[{{ else }} ...]{{ endif }}

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Template::_replcb_inc ( $args)
+
+private
+
+

INC node

+

{{ inc <templatefile> [with $var1=$var2] }}{{ endinc }}

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Template::_replcb_node ( $m)
+
+private
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Template::replace ( $s,
 $r 
)
+
+ +

Referenced by _replcb_for(), and _replcb_inc().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
Template::var_replace ( $s)
+
+private
+
+

regexp: $ literal $ ([)? optional open square bracket ([a-zA-Z0-9-_]+.?)+ var name, followed by optional dot, repeated at least 1 time (?(1)]) if there was opened square bracket (subgrup 1), match close bracket

+ +

Referenced by replace().

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
Template::$d = false
+
+ +
+
+ +
+
+ + + + +
Template::$debug =false
+
+ +
+
+ +
+
+ + + + +
Template::$done = false
+
+ +
+
+ +
+
+ + + + +
Template::$lang = null
+
+ +
+
+ +
+
+ + + + +
Template::$nodes = array()
+
+ +
+
+ +
+
+ + + + +
Template::$r
+
+ +

Referenced by _get_var(), _replcb_for(), _replcb_inc(), and replace().

+ +
+
+ +
+
+ + + + +
Template::$replace
+
+ +
+
+ +
+
+ + + + +
Template::$search
+
+ +
+
+ +
+
+ + + + +
Template::$stack = array()
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + -- cgit v1.2.3