wasp.gui
[ class tree: wasp.gui ] [ index: wasp.gui ] [ all elements ]

Class: Chunk

Source Location: /gui/Chunk.php

Class Overview


Content is the abstract base class for all WASP content. It handles all Template Manager initialization, and template placeholder and form element processing.


Author(s):

  • brian.fioca@pangomedia.com

Variables

Methods


Child classes:

Page
Page is a specific type of Chunk that only draws one entire page of HTML

Class Details

[line 29]
Content is the abstract base class for all WASP content. It handles all Template Manager initialization, and template placeholder and form element processing.



Tags:

abstract:  
author:  brian.fioca@pangomedia.com
since:  0.8


[ Top ]


Class Variables

$_arTemplates =

[line 31]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 33]

Chunk __construct( mixed $oTemplate)



Overridden in child classes as:

Page::__construct()
WizardCard::__construct()

[ Top ]

method draw [line 191]

void draw( )

This method is responsible for drawing the actual content. By default,

nothing is added to the template in the way of placeholders or form elements. Override this method and add your own calls to setPlaceholder() and setFormElements() to make an interesting dynamic php page.




Tags:

access:  public


[ Top ]

method getDataObjects [line 201]

void getDataObjects( )

Gets the data objects used by this content block.

Used for saving everything as a giant transaction




Tags:

access:  public


[ Top ]

method getFormElement [line 78]

string getFormElement( mixed $stName)

gets a single value from either Get or Post



Tags:

return:  value or null
access:  protected


[ Top ]

method getFormElements [line 88]

an getFormElements( )

gets an array of all form element values using the TemplateManager



Tags:

return:  array of element names and their values or an empty array
access:  protected


[ Top ]

method getSelfUrl [line 64]

String getSelfUrl( [mixed $stQueryString = null])

Retrieves the url of the page plus any specified query string



Tags:

return:  URL
access:  protected


[ Top ]

method init [line 182]

void init( )

The init method is designed to be used to initialize all

data objects used on the content block, and gather data submitted from previous requests




Tags:

access:  protected
abstract:  


[ Top ]

method redirect [line 55]

void redirect( mixed $stLocation)

Performs a
  1. header('Location: ')
redirect to the specified location.



Tags:

access:  protected


[ Top ]

method setErrorFields [line 171]

void setErrorFields( mixed $arFields)

FIXME - doesn't really do anything yet



Tags:

access:  public


[ Top ]

method setFormElement [line 123]

void setFormElement( mixed $stName, mixed $stValue)

Sets the value of the specified form element for it's next appearance

on the screen (following the draw() method)




Tags:

access:  public


[ Top ]

method setFormElements [line 133]

void setFormElements( mixed $arElements)

Sets an array of form elements. The array is of format

form element name => value




Tags:

access:  public


[ Top ]

method setPlaceholder [line 113]

void setPlaceholder( mixed $stName, mixed $stValue)

Sets a template "Placeholder" in the template document.

Flexy templates "placeholders" are marked by braces, as in the following example:

  

Hello {NAME}




Tags:

access:  public


[ Top ]

method setRequiredFields [line 162]

void setRequiredFields( mixed $arFields)

FIXME - doesn't really do anything yet



Tags:

access:  public


[ Top ]

method setSelectOptions [line 148]

void setSelectOptions( array $stName, mixed $arOptionValueNames, [mixed $stValue = null])



Tags:

access:  public


Parameters:

array   $stName   of option value => name

[ Top ]


Documentation generated on Sun, 27 Nov 2005 13:15:45 -0500 by phpDocumentor 1.3.0RC3