Abstract Class Zend_View_Abstract

Description

Abstract class for Zend_View to help enforce private constructs.

  • abstract:
  • license: Zend
  • copyright: Copyright (c) 2005-2006 Zend Technologies Inc. (http://www.zend.com)

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


	
			
Direct descendents
Class Description
 class Zend_View Concrete class for handling view scripts.
Variable Summary
 string $_escape
 array $_file
 array $_filter
 array $_helper
 array $_path
 array $_vars
Method Summary
 Zend_View_Abstract __construct ([array $config = array()])
 void addFilter (string|array $name)
 void addFilterPath (string|array $path)
 void addHelperPath (string|array $path)
 void addScriptPath (string|array $path)
 void assign (string|array $spec, mixed 1)
 mixed escape (mixed $var)
 string render (string $name)
 void setEscape (mixed $spec)
 void setFilter (string|array $name)
 void setFilterPath (string|array $path)
 void setHelperPath (string|array $path)
 void setScriptPath (string|array $path)
 void _addPath (string $type, string|array $path)
 string _filter (string $buffer)
 void _loadClass (string $type, string $name, string 2)
 void _script ($name $name)
 void _setPath (string $type, string|array $path)
 string __call (string $name, array $args)
 mixed __get (string $key)
 boolean __isset (string $key)
 void __set (string $key, mixed $val)
Variables
string $_escape = 'htmlspecialchars' (line 81)

Callback for escaping.

  • access: private
array $_file = array() (line 60)

Stack of executing script file names.

  • access: private
array $_filter = array() (line 74)

Stack of Zend_View_Filter names to apply as filters.

  • access: private
array $_helper = array() (line 67)

Instances of helper objects.

  • access: private
array $_path = array(
'script' => array(),'helper'=>array(),'filter'=>array(),)
(line 49)

Path stack for script, helper, and filter directories.

  • access: private
array $_vars = array() (line 42)

Assigned variables.

  • access: private
Methods
Constructor __construct (line 88)

Constructor.

  • access: public
Zend_View_Abstract __construct ([array $config = array()])
  • array $config: Configuration key-value pairs.
addFilter (line 274)

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

  • access: public
void addFilter (string|array $name)
  • string|array $name: One or more filters to add.
addFilterPath (line 250)

Adds to the stack of filter paths in LIFO order.

  • access: public
void addFilterPath (string|array $path)
  • string|array $path: The directory (-ies) to add.
addHelperPath (line 226)

Adds to the stack of helper paths in LIFO order.

  • access: public
void addHelperPath (string|array $path)
  • string|array $path: The directory (-ies) to add.
addScriptPath (line 201)

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

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

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

void assign (string|array $spec, mixed 1)
  • mixed 1: (Optional) If assigning a named variable, use this as the value.
  • string|array $spec: The assignment strategy to use.
escape (line 376)

Escapes a value for output in a view script.

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

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.
setEscape (line 301)

Sets the _escape() callback.

  • access: public
void setEscape (mixed $spec)
  • mixed $spec: The callback for _escape() to use.
setFilter (line 289)

Resets the filter stack.

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

  • access: public
void setFilter (string|array $name)
  • string|array $name: One or more filters to set.
setFilterPath (line 263)

Resets the stack of filter paths.

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

  • access: public
void setFilterPath (string|array $path)
  • string|array $path: The directory (-ies) to set as the path.
setHelperPath (line 239)

Resets the stack of helper paths.

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

  • access: public
void setHelperPath (string|array $path)
  • string|array $path: The directory (-ies) to set as the path.
setScriptPath (line 214)

Resets the stack of view script paths.

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

  • access: public
void setScriptPath (string|array $path)
  • string|array $path: The directory (-ies) to set as the path.
_addPath (line 429)

Adds paths to the path stack in LIFO order.

Zend_View::_addPath($type, 'dirname') adds one directory to the path stack.

Zend_View::_addPath($type, $array) adds one directory for each array element value.

  • access: private
void _addPath (string $type, string|array $path)
  • string $type: The path type ('script', 'helper', or 'filter').
  • string|array $path: The path specification.
_filter (line 403)

Applies the filter callback to a buffer.

  • return: The filtered buffer.
  • access: private
string _filter (string $buffer)
  • string $buffer: The buffer contents.
_loadClass (line 464)

Loads a helper or filter class.

  • access: private
  • todo: should use Zend::loadClass()
void _loadClass (string $type, string $name, string 2)
  • string $type: The class type ('helper' or 'filter').
  • string $name: The base name.
  • string 2: The full class name.
_script (line 387)

Finds a view script from the available directories.

  • access: protected
void _script ($name $name)
  • $name $name: string The base name of the script.
_setPath (line 448)

Resets the path stack for helpers and filters.

  • access: private
void _setPath (string $type, string|array $path)
  • string $type: The path type ('helper' or 'filter').
  • string|array $path: The directory (-ies) to set as the path.
__call (line 179)

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.
__get (line 148)

Retrieves an assigned variable.

Note that variable names may not be prefixed with '_'.

  • return: The variable value.
  • access: public
mixed __get (string $key)
  • string $key: The variable name.
__isset (line 166)

Allows testing with empty() and isset() to work inside templates -- only available on PHP 5.1

  • access: public
boolean __isset (string $key)
  • string $key
__set (line 130)

Directly assigns a variable to the view script.

Note that variable names may not be prefixed with '_'.

  • access: public
void __set (string $key, mixed $val)
  • string $key: The variable name.
  • mixed $val: The variable value.

Documentation generated on Tue, 18 Apr 2006 11:54:37 -0700 by phpDocumentor 1.3.0RC3