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

Class: View

Source Location: /DotKernel/frontend/View.php

Class Overview

Dot_Template
   |
   --View

View Model


Author(s):

Variables

Methods


Child classes:

Page_View
Page View Class
User_View
User View Class

Inherited Variables

Inherited Methods

Class: Dot_Template

Dot_Template::__construct()
Singleton pattern implementation makes 'new' unavailable
Dot_Template::endTimer()
Return the end time
Dot_Template::exists()
Inspired From PEAR HTML_Template_PHPLIB 1. Checks if the given variable exists.
Dot_Template::filename()
When called with a relative pathname, this function will return the pathname with $this->root prepended.
Dot_Template::finish()
Returns the finished version of $str.
Dot_Template::get()
Returns the finished version of the value of the variable named by $varname.
Dot_Template::getInstance()
Returns an instance of Dot_View
Dot_Template::getLastError()
Returns the last error message if any
Dot_Template::getUndefined()
Returns a hash of unresolved variable names in $varname, keyed by their names (that is, the hash has the form $a[$name] = $name).
Dot_Template::getVar()
Returns the value of the variable named by $varname.
Dot_Template::getVars()
Returns an associative array of all defined variables with the name as the key and the value of the variable as the value.
Dot_Template::halt()
Is called whenever an error occurs and will handle the error according to the policy defined in $this->haltOnError. in $this->lastError.
Dot_Template::haltMsg()
Prints an error message.
Dot_Template::initBlock()
Initialize a block A variable $parent may contain a variable block defined by: <!-- BEGIN $varname --> content <!-- END $varname -->.
Dot_Template::initVar()
Initialize the value of a variable.
Dot_Template::loadFile()
If a variable's value is undefined and the variable has a filename stored in $this->file[$varname] then the backing file will be loaded and the file's contents will be assigned as the variable's value.
Dot_Template::p()
Prints the finished version of the value of the variable named by $varname.
Dot_Template::parse()
Substitutes the values of all defined variables in the variable named $varname and stores or appends the result in the variable named $target.
Dot_Template::pparse()
This is shorthand for print $this->parse(.
Dot_Template::psubst()
This is shorthand for print $this->subst($varname).
Dot_Template::setBlock()
A variable $parent may contain a variable block defined by: <!-- BEGIN $varname --> content <!-- END $varname -->.
Dot_Template::setFile()
Defines a filename for the initial value of a variable.
Dot_Template::setRoot()
Checks that $root is a valid directory and if so sets this directory as the base directory from which templates are loaded by storing the value in $this->root.
Dot_Template::setUnknowns()
Sets the policy for dealing with unresolved variable names.
Dot_Template::setVar()
Sets the value of a variable.
Dot_Template::startTimer()
Start the time to measure something
Dot_Template::subst()
Fills in all the variables contained within the variable named $varname. original value of the variable varname is not changed. is not 'finished'.
Dot_Template::unsetVar()
Unsets a variable completely.
Dot_Template::varname()
Will construct a regexp for a given variable name with any special chars quoted.
Dot_Template::__clone()
Singleton pattern implementation makes 'clone' unavailable

Class Details

[line 21]
View Model

View Model abstract over the Dot_Template class




Tags:

author:  DotKernel Team <team@dotkernel.com>


[ Top ]


Class Variables

static $_instance =  null

[line 29]

Singleton instance

Singleton instance




Tags:

access:  protected

Type:   Dot_Template
Overrides:   Array


[ Top ]



Class Methods


static method getInstance [line 39]

static Dot_Template getInstance( [string $root = '.'], [string $unknowns = 'remove'], [array $fallback = ''])

Returns an instance of Dot_View

Returns an instance of Dot_View Singleton pattern implementation




Tags:

access:  public


Overrides Dot_Template::getInstance() (Returns an instance of Dot_View)

Parameters:

string   $root   Template root directory
string   $unknowns   How to handle unknown variables
array   $fallback   Fallback paths

[ Top ]

method displayMessage [line 278]

void displayMessage( )

Display message - error, warning, info

Display message - error, warning, info




Tags:

access:  public


[ Top ]

method init [line 54]

void init( string $requestModule, string $requestController, string $requestAction)

Initalize some parameter

Initalize some parameter




Tags:

access:  public


Parameters:

string   $requestModule  
string   $requestController  
string   $requestAction  

[ Top ]

method setLoginBox [line 261]

void setLoginBox( )

Display login box if user is not logged

Display login box if user is not logged




Tags:

access:  public


[ Top ]

method setSeoValues [line 87]

void setSeoValues( [string $pageTitle = ''])

Set SEO values

Set SEO values




Tags:

access:  public


Parameters:

string   $pageTitle   [optional]

[ Top ]

method setViewFile [line 65]

void setViewFile( )

Set the template file

Set the template file




Tags:

access:  public


[ Top ]

method setViewMenu [line 106]

void setViewMenu( Zend_Config_Ini $config, string $requestController, string $requestAction)

Display the specific menu that were declared in configs/menu.

Display the specific menu that were declared in configs/menu.xml file




Tags:

access:  public


Parameters:

Zend_Config_Ini   $config  
string   $requestController  
string   $requestAction  

[ Top ]

method setViewPaths [line 75]

void setViewPaths( Zend_Config_Ini $config)

Set different paths url(site, templates, images)

Set different paths url(site, templates, images)




Tags:

access:  public


Parameters:

Zend_Config_Ini   $config  

[ Top ]


Documentation generated on Wed, 21 Jul 2010 07:34:49 +0000 by phpDocumentor 1.4.3