mojavi
[ class tree: mojavi ] [ index: mojavi ] [ all elements ]

Class: PHPView

Source Location: /view/PHPView.class.php

Class Overview

MojaviObject
   |
   --View
      |
      --PHPView

A view that uses PHP to render templates.


Author(s):

  • Sean Kerr (skerr@mojavi.org)

Version:

  • $Id: PHPView.class.php 740 2005-01-03 15:37:58Z seank $

Copyright:

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: View

View::clearAttributes()
Clear all attributes associated with this view.
View::decorate()
Loop through all template slots and fill them in with the results of presentation data.
View::execute()
Execute any presentation logic and set template attributes.
View::getAttribute()
Retrieve an attribute.
View::getAttributeNames()
Retrieve an array of attribute names.
View::getContext()
Retrieve the current application context.
View::getDecoratorDirectory()
Retrieve this views decorator template directory.
View::getDecoratorTemplate()
Retrieve this views decorator template.
View::getDirectory()
Retrieve this views template directory.
View::getEngine()
Retrieve the template engine associated with this view.
View::getSlots()
Retrieve an array of specified slots for the decorator template.
View::getTemplate()
Retrieve this views template.
View::importAttributes()
Import parameter values and error messages from the request directly as view attributes.
View::initialize()
Initialize this view.
View::isDecorator()
Indicates that this view is a decorating view.
View::preRenderCheck()
Execute a basic pre-render check to verify all required variables exist and that the template is readable.
View::removeAttribute()
Remove an attribute.
View::render()
Render the presentation.
View::setAttribute()
Set an attribute.
View::setAttributeByRef()
Set an attribute by reference.
View::setAttributes()
Set an array of attributes.
View::setAttributesByRef()
Set an array of attributes by reference.
View::setDecoratorDirectory()
Set the decorator template directory for this view.
View::setDecoratorTemplate()
Set the decorator template for this view.
View::setDirectory()
Set the template directory for this view.
View::setSlot()
Set the module and action to be executed in place of a particular template attribute.
View::setTemplate()
Set the template for this view.

Class: MojaviObject

MojaviObject::toString()
Retrieve a string representation of this object.

Class Details

[line 23]
A view that uses PHP to render templates.



Tags:

abstract:  
version:  $Id: PHPView.class.php 740 2005-01-03 15:37:58Z seank $
since:  3.0.0
copyright:  (c) Sean Kerr, http://www.mojavi.org
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]


Class Methods


method clearAttributes [line 45]

void clearAttributes( )

Clear all attributes associated with this view.



Tags:

access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::clearAttributes() (Clear all attributes associated with this view.)

[ Top ]

method decorate [line 66]

string &decorate( string &$content)

Loop through all template slots and fill them in with the results of presentation data.



Tags:

return:  A decorated template.
access:  protected
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::decorate() (Loop through all template slots and fill them in with the results of presentation data.)

Parameters:

string   &$content   A chunk of decorator content.

[ Top ]

method getAttribute [line 105]

mixed &getAttribute( string $name)

Retrieve an attribute.



Tags:

return:  An attribute value, if the attribute exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::getAttribute() (Retrieve an attribute.)

Parameters:

string   $name   An attribute name.

[ Top ]

method getAttributeNames [line 131]

array getAttributeNames( )

Retrieve an array of attribute names.



Tags:

return:  An indexed array of attribute names.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::getAttributeNames() (Retrieve an array of attribute names.)

[ Top ]

method getEngine [line 147]

null &getEngine( )

Retrieve the template engine associated with this view.

Note: This will return null because PHP itself has no engine reference.




Tags:

access:  public


Overrides View::getEngine() (Retrieve the template engine associated with this view.)

[ Top ]

method removeAttribute [line 169]

mixed &removeAttribute( string $name)

Remove an attribute.



Tags:

return:  An attribute value, if the attribute was removed, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::removeAttribute() (Remove an attribute.)

Parameters:

string   $name   An attribute name.

[ Top ]

method render [line 202]

string &render( )

Render the presentation.

When the controller render mode is View::RENDER_CLIENT, this method will render the presentation directly to the client and null will be returned.




Tags:

return:  A string representing the rendered presentation, if the controller render mode is View::RENDER_VAR, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::render() (Render the presentation.)

[ Top ]

method setAttribute [line 274]

void setAttribute( string $name, mixed $value)

Set an attribute.

If an attribute with the name already exists the value will be overridden.




Tags:

access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::setAttribute() (Set an attribute.)

Parameters:

string   $name   An attribute name.
mixed   $value   An attribute value.

[ Top ]

method setAttributeByRef [line 297]

void setAttributeByRef( string $name, mixed &$value)

Set an attribute by reference.

If an attribute with the name already exists the value will be overridden.




Tags:

access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::setAttributeByRef() (Set an attribute by reference.)

Parameters:

string   $name   An attribute name.
mixed   &$value   A reference to an attribute value.

[ Top ]

method setAttributes [line 320]

void setAttributes( array $attributes)

Set an array of attributes.

If an existing attribute name matches any of the keys in the supplied array, the associated value will be overridden.




Tags:

access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::setAttributes() (Set an array of attributes.)

Parameters:

array   $attributes   An associative array of attributes and their associated values.

[ Top ]

method setAttributesByRef [line 343]

void setAttributesByRef( array &$attributes)

Set an array of attributes by reference.

If an existing attribute name matches any of the keys in the supplied array, the associated value will be overridden.




Tags:

access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides View::setAttributesByRef() (Set an array of attributes by reference.)

Parameters:

array   &$attributes   An associative array of attributes and references to their associated values.

[ Top ]


Documentation generated on Tue, 21 Feb 2006 01:45:24 +0900 by phpDocumentor 1.3.0RC5