Abstract Class Horde_View_Base

Description

Abstract base class for Horde_View to get private constructs out of template scope.

  • abstract:

Located in /View/lib/Horde/View/Base.php (line 14)


	
			
Direct descendents
Class Description
 class Horde_View Concrete class for handling views.
Method Summary
 Horde_View_Base __construct ([array $config = array()])
 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)
 mixed _run ()
 void _template ($name $name)
 string __call (string $method, array $args)
 void __get (string $name)
 void __set (string $name, mixed $value)
Methods
Constructor __construct (line 56)

Constructor.

  • access: public
Horde_View_Base __construct ([array $config = array()])
  • array $config: Configuration key-value pairs.
addHelper (line 148)

Adds to the stack of helpers in LIFO order.

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

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 175)

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 212)

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 236)

Return current escape encoding

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

Processes a template and returns the output.

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

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

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

Sets the escape() callback.

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

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.
_run (line 267)

Use to include the template in a scope that only allows public members.

  • abstract:
  • access: protected
mixed _run ()

Redefined in descendants as:
_template (line 246)

Finds a template from the available directories.

  • access: protected
void _template ($name $name)
  • $name $name: string The base name of the template.
__call (line 103)

Accesses a helper object from within a template.

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

Return a view variable

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

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:15:31 +0000 by phpDocumentor 1.4.3