Abstract Class Zend_View_Abstract

Description

Implements interfaces:

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


	
			
Direct descendents
Class Description
 class Zend_View Concrete class for handling view scripts.
Method Summary
 Zend_View_Abstract __construct ([array $config = array()])
 void addFilter (string|array $name)
 void addFilterPath (string|array $path, [string $classPrefix = 'Zend_View_Filter_'])
 void addHelperPath (string|array $path, [string $classPrefix = 'Zend_View_Helper_'])
 void addScriptPath (string|array $path)
 void assign (string|array $spec, [mixed $value = null])
 void clearVars ()
 mixed escape (mixed $var)
 array getAllPaths ()
 string getEncoding ()
 array getFilterPaths ()
 array getHelperPaths ()
 void getHelpers ()
 array getScriptPaths ()
 array getVars ()
 string render (string $name)
 void setEncoding (string $encoding)
 void setEscape (mixed $spec)
 void setFilter (string|array $name)
 void setFilterPath (string|array $path, [string $classPrefix = 'Zend_View_Filter_'])
 void setHelperPath (string|array $path, [string $classPrefix = 'Zend_View_Helper_'])
 void 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 100)

Constructor.

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

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

Adds to the stack of filter paths in LIFO order.

  • access: public
void 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 269)

Adds to the stack of helper paths in LIFO order.

  • access: public
void 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 232)

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

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

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

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

Return associative array of path types => paths

  • access: public
array getAllPaths ()
getEncoding (line 543)

Return current escape encoding

  • access: public
string getEncoding ()
getEngine (line 145)

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

Returns an array of all currently set filter paths

  • access: public
array getFilterPaths ()
getHelperPaths (line 302)

Returns an array of all currently set helper paths

  • access: public
array getHelperPaths ()
getHelpers (line 307)
  • access: public
void getHelpers ()
getScriptPaths (line 256)

Returns an array of all currently set script paths

  • access: public
array getScriptPaths ()
getVars (line 461)

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

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

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

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

Sets the _escape() callback.

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

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

Resets the stack of filter paths.

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

  • access: public
void 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 288)

Resets the stack of helper paths.

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

  • access: public
void 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 245)

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.

Implementation of:
Zend_View_Interface::setScriptPath()
Set the path to find the view script used by render()
_run (line 744)

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

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

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

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

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

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 Thu, 18 Jan 2007 09:51:55 -0800 by phpDocumentor 1.3.1