[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/view/ -> sfView.class.php (sommaire)

A view represents the presentation layer of an action. Output can be customized by supplying attributes, which a template can manipulate and display.

Author: Fabien Potencier <fabien.potencier@symfony-project.com>
Author: Sean Kerr <skerr@mojavi.org>
Version: SVN: $Id: sfView.class.php 3250 2007-01-12 20:09:11Z fabien $
Poids: 669 lignes (17 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 32 fonctions

  getContext()
  getDecoratorDirectory()
  getDecoratorTemplate()
  getDirectory()
  getTemplate()
  getEscaping()
  getEscapingMethod()
  importAttributes()
  initialize()
  getAttributeHolder()
  getAttribute()
  hasAttribute()
  setAttribute()
  getParameterHolder()
  getParameter()
  hasParameter()
  setParameter()
  isDecorator()
  setDecorator()
  preRenderCheck()
  setDecoratorDirectory()
  setEscaping()
  setEscapingMethod()
  setDecoratorTemplate()
  setDirectory()
  setComponentSlot()
  hasComponentSlot()
  getComponentSlot()
  setTemplate()
  getExtension()
  setExtension()
  __call()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

getContext()   X-Ref
Retrieves the current application context.

return: sfContext The current sfContext instance

getDecoratorDirectory()   X-Ref
Retrieves this views decorator template directory.

return: string An absolute filesystem path to this views decorator template directory

getDecoratorTemplate()   X-Ref
Retrieves this views decorator template.

return: string A template filename, if a template has been set, otherwise null

getDirectory()   X-Ref
Retrieves this view template directory.

return: string An absolute filesystem path to this views template directory

getTemplate()   X-Ref
Retrieves this views template.

return: string A template filename, if a template has been set, otherwise null

getEscaping()   X-Ref
Gets the default escaping strategy associated with this view.

The escaping strategy specifies how the variables get passed to the view.

return: string the escaping strategy

getEscapingMethod()   X-Ref
Returns the name of the function that is to be used as the escaping method.

If the escaping method is empty, then that is returned. The default value
specified by the sub-class will be used. If the method does not exist (in
the sense there is no define associated with the method) and exception is
thrown.

return: string The escaping method as the name of the function to use

importAttributes($names, $files = false, $errors = true, $stripTags = true, $specialChars = true)   X-Ref
Imports parameter values and error messages from the request directly as view attributes.

param: array An indexed array of file/parameter names
param: boolean  Is this a list of files?
param: boolean  Import error messages too?
param: boolean  Run strip_tags() on attribute value?
param: boolean  Run htmlspecialchars() on attribute value?

initialize($context, $moduleName, $actionName, $viewName)   X-Ref
Initializes this view.

param: sfContext The current application context
param: string The module name for this view
param: string The action name for this view
param: string The view name
return: boolean true, if initialization completes successfully, otherwise false

getAttributeHolder()   X-Ref
Retrieves attributes for the current view.

return: sfParameterHolder The attribute parameter holder

getAttribute($name, $default = null, $ns = null)   X-Ref
Retrieves an attribute for the current view.

param: string Name of the attribute
param: string Value of the attribute
param: string The current namespace
return: mixed Attribute

hasAttribute($name, $ns = null)   X-Ref
Returns true if the view have attributes.

param: string Name of the attribute
param: string Namespace for the current view
return: mixed Attribute of the view

setAttribute($name, $value, $ns = null)   X-Ref
Sets an attribute of the view.

param: string Attribute name
param: string Value for the attribute
param: string Namespace for the current

getParameterHolder()   X-Ref
Retrieves the parameters for the current view.

return: sfParameterHolder The parameter holder

getParameter($name, $default = null, $ns = null)   X-Ref
Retrieves a parameter from the current view.

param: string Parameter name
param: string Default parameter value
param: string Namespace for the current view
return: mixed A parameter value

hasParameter($name, $ns = null)   X-Ref
Indicates whether or not a parameter exist for the current view.

param: string Name of the paramater
param: string Namespace for the current view
return: boolean true, if the parameter exists otherwise false

setParameter($name, $value, $ns = null)   X-Ref
Sets a parameter for the view.

param: string Name of the parameter
param: string The parameter value
param: string Namespace for the current view

isDecorator()   X-Ref
Indicates that this view is a decorating view.

return: boolean true, if this view is a decorating view, otherwise false

setDecorator($boolean)   X-Ref
Sets the decorating mode for the current view.

param: boolean Set the decorating mode for the view

preRenderCheck()   X-Ref
Executes a basic pre-render check to verify all required variables exist
and that the template is readable.


setDecoratorDirectory($directory)   X-Ref
Sets the decorator template directory for this view.

param: string An absolute filesystem path to a template directory

setEscaping($escaping)   X-Ref
Sets the escape caracter mode.

param: string Escape code

setEscapingMethod($method)   X-Ref
Sets the escaping method for the current view.

param: string Method for escaping

setDecoratorTemplate($template)   X-Ref
Sets the decorator template for this view.

If the template path is relative, it will be based on the currently
executing module's template sub-directory.

param: string An absolute or relative filesystem path to a template

setDirectory($directory)   X-Ref
Sets the template directory for this view.

param: string An absolute filesystem path to a template directory

setComponentSlot($attributeName, $moduleName, $componentName)   X-Ref
Sets the module and action to be executed in place of a particular template attribute.

param: string A template attribute name
param: string A module name
param: string A component name

hasComponentSlot($name)   X-Ref
Indicates whether or not a component slot exists.

param: string The component slot name
return: boolean true, if the component slot exists, otherwise false

getComponentSlot($name)   X-Ref
Gets a component slot

param: string The component slot name
return: array The component slot

setTemplate($template)   X-Ref
Sets the template for this view.

If the template path is relative, it will be based on the currently
executing module's template sub-directory.

param: string An absolute or relative filesystem path to a template

getExtension()   X-Ref
Retrieves the current view extension.

return: string The extension for current view.

setExtension($ext)   X-Ref
Sets an extension for the current view.

param: string The extension name.

__call($method, $arguments)   X-Ref
Overloads a given method

param: string Method name
param: string Method arguments
return: mixed User function callback



Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7