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

Class: Quinoa

Source Location: /Quinoa.php

Class Overview


Quinoa Base class.


Author(s):

Version:

  • 0.0.21 2007-09-23

Copyright:

  • 2007

Variables

Methods


Child classes:

Quinoa_Ajax
Quinoa_Ajax base class.
Quinoa_HTML_Footer
Quinoa HTML Footer class.
Quinoa_HTML_Form
Quinoa HTML Form class.
Quinoa_HTML_Header
Quinoa HTML Header class.
Quinoa_HTML_Menu
Quinoa HTML Footer class.
Quinoa_HTML_Pager
Quinoa HTML Pager class.
Quinoa_HTML_Tabulardata
Quinoa HTML Tabulardata class.

Class Details

[line 51]
Quinoa Base class.

Quinoa Base class. Quinoa class is the base of the presentation layer. Every presentation class will inherit from it or a class that inherits from it. It has two basic properties fragment and templatePath. They serve to find the template used by the presentation class. Every new property added to Quinoa's inheriting classes can be used inside the template. For example if I assign a value to my property name ($this->name = "John";) I now have a variable {$name} that I can call whenever I need inside my fragment. PHP version 5.x Copyright (c) 2007, Freeconcept, Lda. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Freeconcept, Lda. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.




Tags:

since:  File available since Release 0.0.1
link:  http://www.quinoaframework.org
version:  0.0.21 2007-09-23
copyright:  2007
author:  Marcello Duarte <marcello.duarte@gmail.com>


[ Top ]


Class Variables

$_fragment =

[line 59]

The fragment I use for the output of my presentation class

The fragment I use for the output of my presentation class




Tags:

access:  protected

Type:   string


[ Top ]

$_templatePath =

[line 66]

The path to my fragment.

The path to my fragment. When null Quinoa uses the $CONFIG->TEMPLATE_PATH




Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 74]

Quinoa __construct( [mixed $vars = null])

Constructs a Quinoa object

Constructs a Quinoa object




Tags:

access:  public


Overridden in child classes as:

Quinoa_Ajax::__construct()
Constructs a Quinoa_Ajax object
Quinoa_HTML_Pager::__construct()
Constructs a Quinoa_Pager object
Quinoa_HTML_Tabulardata::__construct()
Constructs a Quinoa_HTML_Tabulardata

Parameters:

mixed   $vars  

[ Top ]

method fetch [line 118]

string fetch( [boolean $isFragment = false])

Assign the values given to the template variables so that it is visible

Assign the values given to the template variables so that it is visible inside the template, fetches the template and return it as a string




Tags:

access:  public


Parameters:

boolean   $isFragment  

[ Top ]

method getFragment [line 195]

string getFragment( )

Fragment get accessor

Fragment get accessor




Tags:

access:  public


[ Top ]

method getTemplatePath [line 225]

string getTemplatePath( )

templatePath get accessor

templatePath get accessor




Tags:

access:  public


[ Top ]

method getVar [line 156]

mixed getVar( string $var)

Generic get accessor

Generic get accessor




Tags:

access:  public


Parameters:

string   $var  

[ Top ]

method hasFragment [line 205]

boolean hasFragment( )

Tests whether the presentation class has a fragment or not

Tests whether the presentation class has a fragment or not




Tags:

access:  public


[ Top ]

method onLoad [line 109]

void onLoad( )

Method overwriten by inheriting classes.

Method overwriten by inheriting classes. Here is where everything that is supposed to happen before the page is load happens. Here is were you give This method is called by the constructor.




Tags:

access:  public


Overridden in child classes as:

Quinoa_Ajax_Suggest::onLoad()
onLoad function is called by the Quinoa constructor.
Quinoa_HTML_Form::onLoad()
This class is called first.
Quinoa_HTML_Header::onLoad()
Quinoa_HTML_Menu_Horizontalmenu::onLoad()
Quinoa_HTML_Menu_Verticalmenu::onLoad()
Quinoa_HTML_Tabulardata::onLoad()
Needed for inheriting classes to add pre processing

[ Top ]

method setFragment [line 185]

void setFragment( string $fragment)

Fragment set accessor

Fragment set accessor




Tags:

access:  public


Parameters:

string   $fragment  

[ Top ]

method setTemplatePath [line 215]

void setTemplatePath( string $templatePath)

templatePath set accessor

templatePath set accessor




Tags:

access:  public


Parameters:

string   $templatePath  

[ Top ]

method setVar [line 171]

mixed setVar( string $var, mixed $val)

Generic set accessor

Generic set accessor




Tags:

access:  public


Parameters:

string   $var  

[ Top ]

method __toString [line 145]

string __toString( )

Magic method to cast the object as string

Magic method to cast the object as string




Tags:

access:  public


[ Top ]


Documentation generated on Wed, 03 Oct 2007 14:25:53 +0100 by phpDocumentor 1.3.0RC3