ClassInterface Horde_View_Interface

Description

Horde_View_Interface is a reference for classes to be used as Horde Views. Implementing it is optional; type hinting is not used to enforce the interface.

Located in /View/lib/Horde/View/Interface.php (line 15)


	
			
Method Summary
 void addHelper (Horde_View_Helper $helper)
 void addTemplatePath (string|array $path)
 void assign (array $array)
 mixed escape (mixed $var)
 string getEncoding ()
 string render (string $name)
 void setEncoding (string $encoding)
 void setEscape (mixed $spec)
 void setTemplatePath (string|array $path)
 string __call (string $name, array $args)
 void __get (string $name)
 void __set (string $name, mixed $value)
Methods
addHelper (line 63)

Adds to the stack of helpers in LIFO order.

  • access: public
void addHelper (Horde_View_Helper $helper)
addTemplatePath (line 47)

Adds to the stack of template paths in LIFO order.

  • access: public
void addTemplatePath (string|array $path)
  • string|array $path: The directory (-ies) to add.
assign (line 82)

Assigns multiple variables to the view.

The array keys are used as names, each assigned their corresponding array value.

void assign (array $array)
  • array $array: The array of key/value pairs to assign.
escape (line 103)

Escapes a value for output in a template.

If escaping mechanism is one of htmlspecialchars or htmlentities, uses $_encoding setting.

  • return: The escaped value.
  • access: public
mixed escape (mixed $var)
  • mixed $var: The output to escape.
getEncoding (line 117)

Return current escape encoding

  • access: public
string getEncoding ()
render (line 91)

Processes a template and returns the output.

  • return: The template output.
  • access: public
string render (string $name)
  • string $name: The template name to process.
setEncoding (line 110)

Set encoding to use with htmlentities() and htmlspecialchars()

  • access: public
void setEncoding (string $encoding)
  • string $encoding
setEscape (line 70)

Sets the escape() callback.

  • access: public
void setEscape (mixed $spec)
  • mixed $spec: The callback for escape() to use.
setTemplatePath (line 56)

Resets the stack of template paths.

To clear all paths, use Horde_View::setTemplatePath(null).

  • access: public
void setTemplatePath (string|array $path)
  • string|array $path: The directory (-ies) to set as the path.
__call (line 40)

Accesses a helper object from within a template.

  • return: The result of the helper output.
  • access: public
string __call (string $name, array $args)
  • string $name: The helper name.
  • array $args: The parameters for the helper.
__get (line 22)

Return a view variable

  • access: public
void __get (string $name)
  • string $name: Variable name to retrieve
__set (line 30)

Assign a single view variable

  • access: public
void __set (string $name, mixed $value)
  • string $name: Variable name to set
  • mixed $value: The value of $name

Documentation generated on Sun, 30 Jan 2011 05:18:36 +0000 by phpDocumentor 1.4.3