## Zend_View_Abstract

Description

Implements interfaces:

- Zend_View_Interface

Abstract class for Zend_View to help enforce private constructs.

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/View/Abstract.php (line 39)

Direct descendents

Class | Description
--- | ---
Zend_View | Concrete class for handling view scripts.

Method Summary
Zend_View_Abstract __construct ([array $config = array()])
Zend_View_Abstract addFilter (string|array $name)
Zend_View_Abstract addFilterPath (string|array $path, [string $classPrefix = 'Zend_View_Filter_'])
Zend_View_Abstract addHelperPath (string|array $path, [string $classPrefix = 'Zend_View_Helper_'])
Zend_View_Abstract addScriptPath (string|array $path)
void assign (string|array $spec, [mixed $value = null])
void clearVars ()
mixed escape (mixed $var)
array getAllPaths ()
string getEncoding ()
Zend_View_Abstract getEngine ()
array getFilterPaths ()
array getHelperPaths ()
void getHelpers ()
array getScriptPaths ()
array getVars ()
string render (string $name)
Zend_View_Abstract setEncoding (string $encoding)
Zend_View_Abstract setEscape (mixed $spec)
Zend_View_Abstract setFilter (string|array $name)
Zend_View_Abstract setFilterPath (string|array $path, [string $classPrefix = 'Zend_View_Filter_'])
Zend_View_Abstract setHelperPath (string|array $path, [string $classPrefix = 'Zend_View_Helper_'])
Zend_View_Abstract setScriptPath (string|array $path)
mixed _run ()
void _script ($name $name)
string __call (string $name, array $args)
boolean __isset (string $key)
void __set (string $key, mixed $val)
void __unset (string $key)
Methods
Constructor __construct (line 105)

Constructor.

- access: public

Zend_View_Abstract __construct ([array $config = array()])

- array $config: Configuration key-value pairs.

addFilter (line 385)

Add one or more filters to the stack in FIFO order.

- access: public

Zend_View_Abstract addFilter (string|array $name)

- string|array $name: One or more filters to add.

addFilterPath (line 329)

Adds to the stack of filter paths in LIFO order.

- access: public

Zend_View_Abstract addFilterPath (string|array $path, [string $classPrefix = 'Zend_View_Filter_'])

- string $classPrefix: Class prefix to use with classes in this directory; defaults to Zend_View_Filter
- string|array $path: The directory (-ies) to add.

addHelperPath (line 276)

Adds to the stack of helper paths in LIFO order.

- access: public

Zend_View_Abstract addHelperPath (string|array $path, [string $classPrefix = 'Zend_View_Helper_'])

- string $classPrefix: Class prefix to use with classes in this directory; defaults to Zend_View_Helper
- string|array $path: The directory (-ies) to add.

addScriptPath (line 237)

Adds to the stack of view script paths in LIFO order.

- access: public

Zend_View_Abstract addScriptPath (string|array $path)

- string|array $path: The directory (-ies) to add.

assign (line 437)

Assigns variables to the view script via differing strategies.

Zend_View::assign('name', $value) assigns a variable called 'name' with the corresponding $value.

Zend_View::assign($array) assigns the array keys as variable names (with the corresponding array values).

- access: public
- throws: Zend_View_Exception if $spec is neither a string nor an array, or if an attempt to set a private or protected member is detected
- see: Zend_View_Abstract::__set()

void assign (string|array $spec, [mixed $value = null])

- string|array $spec: The assignment strategy to use.
- mixed $value: (Optional) If assigning a named variable, use this as the value.

Implementation of:

Zend_View_Interface::assign()
  Assign variables to the view script via differing strategies.

clearVars (line 495)

Clear all assigned variables

Clears all variables assigned to Zend_View either via assign() or property overloading (__set()).

- access: public

void clearVars ()

Implementation of:

Zend_View_Interface::clearVars()
  Clear all assigned variables

escape (line 532)

Escapes a value for output in a view script.

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.

getAllPaths (line 374)

Return associative array of path types => paths

- access: public

array getAllPaths ()
getEncoding (line 558)

Return current escape encoding

- access: public

string getEncoding ()
getEngine (line 150)

Return the template engine object

Returns the object instance, as it is its own template engine

- access: public

Zend_View_Abstract getEngine ()

Implementation of:

Zend_View_Interface::getEngine()
  Return the template engine object, if any

getFilterPaths (line 364)

Returns an array of all currently set filter paths

- access: public

array getFilterPaths ()
getHelperPaths (line 311)

Returns an array of all currently set helper paths

- access: public

array getHelperPaths ()
getHelpers (line 316)

- access: public

void getHelpers ()
getScriptPaths (line 263)

Returns an array of all currently set script paths

- access: public

array getScriptPaths ()
getVars (line 475)

Return list of all assigned variables

Returns all public properties of the object. Reflection is not used here as testing reflection properties for visibility is buggy.

- access: public

array getVars ()
render (line 511)

Processes a view script and returns the output.

- return: The script output.
- access: public

string render (string $name)

- string $name: The script script name to process.

Implementation of:

Zend_View_Interface::render()
  Processes a view script and returns the output.

setEncoding (line 547)

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

- access: public

Zend_View_Abstract setEncoding (string $encoding)

- string $encoding

setEscape (line 414)

Sets the _escape() callback.

- access: public

Zend_View_Abstract setEscape (mixed $spec)

- mixed $spec: The callback for _escape() to use.

setFilter (line 401)

Resets the filter stack.

To clear all filters, use Zend_View::setFilter(null).

- access: public

Zend_View_Abstract setFilter (string|array $name)

- string|array $name: One or more filters to set.

setFilterPath (line 349)

Resets the stack of filter paths.

To clear all paths, use Zend_View::setFilterPath(null).

- access: public

Zend_View_Abstract setFilterPath (string|array $path, [string $classPrefix = 'Zend_View_Filter_'])

- string $classPrefix: The class prefix to apply to all elements in $path; defaults to Zend_View_Filter
- string|array $path: The directory (-ies) to set as the path.

setHelperPath (line 296)

Resets the stack of helper paths.

To clear all paths, use Zend_View::setHelperPath(null).

- access: public

Zend_View_Abstract setHelperPath (string|array $path, [string $classPrefix = 'Zend_View_Helper_'])

- string|array $path: The directory (-ies) to set as the path.
- string $classPrefix: The class prefix to apply to all elements in $path; defaults to Zend_View_Helper

setScriptPath (line 251)

Resets the stack of view script paths.

To clear all paths, use Zend_View::setScriptPath(null).

- access: public

Zend_View_Abstract setScriptPath (string|array $path)

- string|array $path: The directory (-ies) to set as the path.

Implementation of:

Zend_View_Interface::setScriptPath()
  Set the path to find the view script used by render()

_run (line 760)

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

- access: protected
- abstract:

mixed _run ()

Redefined in descendants as:

- Zend_View::_run() : Includes the view script in a scope with only public $this variables.

_script (line 569)

Finds a view script from the available directories.

- access: protected

void _script ($name $name)

- $name $name: string The base name of the script.

__call (line 215)

Accesses a helper object from within a script.

- 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.

__isset (line 162)

Allows testing with empty() and isset() to work inside templates.

- access: public

boolean __isset (string $key)

- string $key

Implementation of:

Zend_View_Interface::__isset()
  Allows testing with empty() and isset() to work

__set (line 184)

Directly assigns a variable to the view script.

Checks first to ensure that the caller is not attempting to set a protected or private member (by checking for a prefixed underscore); if not, the public member is set; otherwise, an exception is raised.

- access: public
- throws: Zend_View_Exception if an attempt to set a private or protected member is detected

void __set (string $key, mixed $val)

- string $key: The variable name.
- mixed $val: The variable value.

Implementation of:

Zend_View_Interface::__set()
  Assign a variable to the view

__unset (line 201)

Allows unset() on object properties to work

- access: public

void __unset (string $key)

- string $key

Implementation of:

Zend_View_Interface::__unset()
  Allows unset() on object properties to work

Documentation generated on Wed, 21 Feb 2007 11:45:17 -0800 by phpDocumentor 1.3.1