phpDocumentor Naos
[ class tree: Naos ] [ index: Naos ] [ all elements ]

Class: Naos_View

Source Location: /View.php

Class Naos_View

Class Overview

Naos_View is a Smarty wrapper for Zend_View style usage.

Located in /View.php [line 26]



		
				Author(s):
		
Information Tags:
Copyright:  Copyright (c) 2008 Jupiter GmbH
License:  http://www.naos-framework.com/website.naos.framework/en/license

Methods

[ Top ]
Descendants
Child Class Description
Naos_Layout Naos_Layout implements the rendering of a layout.

[ Top ]
Method Summary
void   __construct()   Constructor; initializes Naos_View object
void   addBasePath()   Add an additional path to view resources
void   addPluginPath()  
Naos_View   addTemplatePath()   Adds to the stack of view template paths in LIFO order.
void   assign()   Assign variables to the view script via differing strategies.
void   clearVars()   Clear all assigned variables
Smarty   getEngine()   Return the template engine object
array   getScriptPaths()   Retrieve all view script paths
array   getTemplatePaths()   Returns an array of all currently set template paths
void   preRender()   Precompiles a view script.
string   render()   Processes a view script and returns the output.
void   setBasePath()   Set a base path to all view resources
void   setCompileHandler()   Sets a new compile handler
Naos_View   setScriptPath()   Set the path to find the view script used by render()
Naos_View   setTemplatePath()   Resets the stack of view script paths.
boolean   __isset()   Allows testing with empty() and isset() to work
void   __set()   Assign a variable to the view
void   __unset()   Allows unset() on object properties to work

[ Top ]
Methods
Constructor __construct  [line 63]

  void __construct( )

Constructor; initializes Naos_View object


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
addBasePath  [line 254]

  void addBasePath( string $path, [string $classPrefix = 'Zend_View']  )

Add an additional path to view resources

Parameters:
string   $path: 
string   $classPrefix: 

API Tags:
Access:  public


[ Top ]
addPluginPath  [line 203]

  void addPluginPath( $path  )

Parameters:
   $path: 

API Tags:
Access:  public


[ Top ]
addTemplatePath  [line 197]

  Naos_View addTemplatePath( string|array $path  )

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

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

API Tags:
Access:  public


[ Top ]
assign  [line 309]

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

Assign variables to the view script via differing strategies.

Suggested implementation is to allow setting a specific key to the specified value, OR passing an array of key => value pairs to set en masse.

Parameters:
string|array   $spec:  The assignment strategy to use (key or array of key => value pairs)
mixed   $value:  (Optional) If assigning a named variable, use this as the value.

API Tags:
See:  Naos_View::__set()
Access:  public


[ Top ]
clearVars  [line 322]

  void clearVars( )

Clear all assigned variables

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


API Tags:
Access:  public


[ Top ]
getEngine  [line 91]

  Smarty getEngine( )

Return the template engine object


API Tags:
Access:  public


[ Top ]
getScriptPaths  [line 186]

  array getScriptPaths( )

Retrieve all view script paths


API Tags:
Access:  public


[ Top ]
getTemplatePaths  [line 228]

  array getTemplatePaths( )

Returns an array of all currently set template paths


API Tags:
Access:  public


[ Top ]
preRender  [line 342]

  void preRender( string $name  )

Precompiles a view script.

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

API Tags:
Access:  public


[ Top ]
render  [line 377]

  string render( string $name  )

Processes a view script and returns the output.

Parameters:
string   $name:  optional, if you called prerender beforehand

API Tags:
Return:  The script output.
Access:  public


[ Top ]
setBasePath  [line 240]

  void setBasePath( string $path, [string $classPrefix = 'Zend_View']  )

Set a base path to all view resources

Parameters:
string   $path: 
string   $classPrefix:  (not used)

API Tags:
Access:  public


[ Top ]
setCompileHandler  [line 332]

  void setCompileHandler( $handler  )

Sets a new compile handler

Parameters:
Naos_Template_HtmlCompiler_AbstractHandler   $handler: 

API Tags:
Access:  public


[ Top ]
setScriptPath  [line 176]

  Naos_View setScriptPath( string|array $path  )

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

Parameters:
string|array   $path:  The directory (-ies) to set as the path. Note that the concrete view implentation may not necessarily support multiple directories.

API Tags:
Access:  public


[ Top ]
setTemplatePath  [line 217]

  Naos_View setTemplatePath( string|array $path  )

Resets the stack of view script paths.

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

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

API Tags:
Access:  public


[ Top ]
__isset  [line 279]

  boolean __isset( string $key  )

Allows testing with empty() and isset() to work

Parameters:
string   $key: 

API Tags:
Access:  public


[ Top ]
__set  [line 268]

  void __set( string $key, mixed $val  )

Assign a variable to the view

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

API Tags:
Access:  public


[ Top ]
__unset  [line 290]

  void __unset( string $key  )

Allows unset() on object properties to work

Parameters:
string   $key: 

API Tags:
Access:  public


[ Top ]

Documentation generated on Sat, 13 Sep 2008 01:41:03 -0400 by phpDocumentor 1.4.0