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

Class: Renderer

Source Location: /Renderer.class.php

Class Overview


Renderer renders a PHP template file.


Author(s):

  • Sean Kerr

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 43]
Renderer renders a PHP template file.



Tags:

since:  1.0
author:  Sean Kerr


[ Top ]


Class Variables

$dir =

[line 62]

An absolute file-system path where a template can be found.



Tags:

since:  1.0
access:  protected

Type:   mixed


[ Top ]

$engine =

[line 71]

The template engine instance.



Tags:

since:  2.0
access:  protected

Type:   mixed


[ Top ]

$result =

[line 94]

The result of a render when render mode is RENDER_VAR.



Tags:

since:  2.0
access:  protected

Type:   mixed


[ Top ]

$template =

[line 103]

A relative or absolute file-system path to a template.



Tags:

since:  1.0
access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor Renderer [line 111]

Renderer &Renderer( )

Create a new Renderer instance.



Tags:

since:  1.0
access:  public


[ Top ]

method clearResult [line 132]

void clearResult( )

Clear the rendered result.



<note> This is only useful when render mode is RENDER_VAR. </note>




[ Top ]

method execute [line 162]

void execute( Controller &$controller, Request &$request, User &$user)

Render the view.



<note> This method should never be called manually. </note>




Tags:

since:  1.0
access:  public


Parameters:

Controller   &$controller   A Controller instance.
Request   &$request   A Request instance.
User   &$user   A User instance.

[ Top ]

method fetchResult [line 253]

string &fetchResult( Controller &$controller, Request &$request, User &$user)

Retrieve the rendered result when render mode is RENDER_VAR.



Tags:

return:  A rendered view.
since:  2.0
access:  public


Parameters:

Controller   &$controller   A Controller instance.
Request   &$request   A Request instance.
User   &$user   A User instance.

[ Top ]

method getAttribute [line 286]

mixed &getAttribute( string $name)

Retrieve an attribute.



Tags:

return:  An attribute value, if the given attribute exists, otherwise NULL.
since:  1.0
access:  public


Parameters:

string   $name   An attribute name.

[ Top ]

method getEngine [line 309]

bool &getEngine( )

Retrieve the template engine instance.



Tags:

return:  NULL because no template engine exists for PHP templates.
since:  2.0
access:  public


[ Top ]

method getMode [line 326]

int getMode( )

Retrieve the render mode, which is one of the following:

  • RENDER_CLIENT - render to client
  • RENDER_VAR - render to variable




Tags:

return:  A render mode.


[ Top ]

method getTemplateDir [line 348]

string getTemplateDir( )

Retrieve an absolute file-system path to the template directory.



<note> This will return NULL unless a directory has been specified with setTemplateDir(). </note>




Tags:

return:  A template directory.
since:  1.0
access:  public


[ Top ]

method isPathAbsolute [line 363]

void isPathAbsolute( string $path)

Determine if a file-system path is absolute.



Tags:

since:  2.0
access:  public


Parameters:

string   $path   A file-system path.

[ Top ]

method removeAttribute [line 390]

void &removeAttribute( string $name)

Remove an attribute.



Tags:

since:  1.0
access:  public


Parameters:

string   $name   An attribute name.

[ Top ]

method setArray [line 410]

void setArray( array $array)

Set multiple attributes by using an associative array.



Tags:

since:  2.0
access:  public


Parameters:

array   $array   An associative array of attributes.

[ Top ]

method setArrayByRef [line 425]

void setArrayByRef( array &$array)

Set multiple attributes by using a reference to an associative array.



Tags:

since:  2.0
access:  public


Parameters:

array   &$array   An associative array of attributes.

[ Top ]

method setAttribute [line 449]

void setAttribute( string $name, mixed $value)

Set an attribute.



Tags:

since:  1.0
access:  public


Parameters:

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

[ Top ]

method setAttributeByRef [line 465]

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

Set an attribute by reference.



Tags:

since:  1.0
access:  public


Parameters:

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

[ Top ]

method setMode [line 485]

void setMode( int $mode)

Set the render mode, which is one of the following:

  • RENDER_CLIENT - render to client
  • RENDER_VAR - render to variable




Tags:

since:  2.0
access:  public


Parameters:

int   $mode   A render mode.

[ Top ]

method setTemplate [line 500]

void setTemplate( template $template)

Set the template.



Tags:

since:  1.0
access:  public


Parameters:

template   $template   A relative or absolute file-system path to a template.

[ Top ]

method setTemplateDir [line 515]

void setTemplateDir( dir $dir)

Set the template directory.



Tags:

since:  1.0
access:  public


Parameters:

dir   $dir   An absolute file-system path to the template directory.

[ Top ]

method templateExists [line 541]

bool templateExists( template $template, [dir $dir = NULL])

Determine if a template exists.



Tags:

return:  TRUE, if the template exists and is readable, otherwise FALSE.
since:  2.0
access:  public


Parameters:

template   $template   A relative or absolute file-system path to the template.
dir   $dir   An absolute file-system path to the template directory.

[ Top ]


Documentation generated on Wed, 15 Jun 2005 11:43:39 +0900 by phpDocumentor 1.2.3