phpDocumentor jqGrid
[ class tree: jqGrid ] [ index: jqGrid ] [ all elements ]

Class: Template

Source Location: /jqUtils.php

Class Template

Class Overview

Simple template engine class (use [@tag] tags in your templates).

Located in /jqUtils.php [line 626]



		
				Author(s):
		
		
		
Information Tags:
Version:  1.0
Link:  Broculos.net Programming Tutorials

Properties

Methods

[ Top ]
Property Summary
string   $file   The filename of the template to load.
mixed   $sanitize  
array   $values   An array of values for replacing each tag on the template (the key for each value is its corresponding tag).

[ Top ]
Method Summary
static string   merge()   Merges the content from an array of templates and separates it with $separator.
Template   __construct()   Creates a new Template object and sets its associated file.
string   output()   Outputs the content of the template, replacing the keys for its respective values.
void   set()   Sets a value for replacing a specific tag.

[ Top ]
Properties
string   $file [line 633]

The filename of the template to load.

API Tags:
Access:  protected


[ Top ]
mixed   $sanitize = true [line 642]
API Tags:
Access:  public


[ Top ]
array   $values = array() [line 640]

An array of values for replacing each tag on the template (the key for each value is its corresponding tag).

API Tags:
Access:  protected


[ Top ]
Methods
static method merge  [line 697]

  static string merge( array $templates, [ $str_template = ''], [string $separator = "\n"]  )

Merges the content from an array of templates and separates it with $separator.

Parameters:
array   $templates:  an array of Template objects to merge
string   $separator:  the string that is used between each Template object
   $str_template: 

API Tags:
Access:  public


[ Top ]
Constructor __construct  [line 649]

  Template __construct( string $file  )

Creates a new Template object and sets its associated file.

Parameters:
string   $file:  the filename of the template to load

API Tags:
Access:  public


[ Top ]
output  [line 667]

  string output( [ $str_template = '']  )

Outputs the content of the template, replacing the keys for its respective values.

Parameters:
   $str_template: 

API Tags:
Access:  public


[ Top ]
set  [line 658]

  void set( string $key, string $value  )

Sets a value for replacing a specific tag.

Parameters:
string   $key:  the name of the tag to replace
string   $value:  the value to replace

API Tags:
Access:  public


[ Top ]

Documentation generated on Wed, 22 Jun 2011 14:57:51 +0300 by phpDocumentor 1.4.3