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

Class: BifWidget

Source Location: /Widgets/Base/widget.BifWidget.php

Class Overview

PEAR
   |
   --BifWidget

The main class


Author(s):

Version:

  • $Revision: 1.30 $

Variables

Methods


Child classes:

Footer
The pages' footer
Header
The pages' header
BifContainer
The simplest container, mother of all other containers
BifWarning
Special widget designed to show errors in widgets
AuthStatus
Shows user authentication status (logged, logging, anonymous, etc)
BifImage
Implements a Basic Image inclusion
BifLangSelector
Language Selector
BifLink
Implements a Basic Link for multiple usage
BifRawText
Basic widget to include text in 'raw mode'
BifText
Basic widget to include text
BifTimestamp
Prints timestamps with a specific format
FormCheckbox
Form's Checkbox
FormHidden
Form's Hidden
FormPassword
Form's Password input
FormRadio
Form's Radio buttons
FormSelectItem
Form's Selection Item
FormSubmit
Form's submit button
FormText
Form's Text input
FormURL
Form's URL input
FormFile
Form's file type field
Boton
Boton is ment to be user with 'Botonera'
ChangeState
Abstract class. Implement childs with 2 representations URL based
FromDotBif
Content of the widget is the result of rendering .bif file
FTItem
This abstract class represents every item on a Form-table.
FileBz2
Shows a .bz2 file content
FileContent
Shows file contents
FileGz
Shows a .gz file content
FileList
Lists directory
FilePhp
Shows a .php file (syntax color highlight)
FileRecent
From a given directory, it shows only last modified file.
MyCounter
Rustic Visit counter...
MySQLList
This an abstract widget to display lists.
MySQLSelect
An html's "select" input generated from a MySQL Query
MySQLTable
A simple table based on SQL query.
MySQLVar
It's a useful widget as a variable replacement for .bif
ArrayTable
A simple table based on an Array
Title1
Use Title widget for titles.
Title2
Use Title widget for titles.
Title3
Use Title widget for titles.

Inherited Variables

Inherited Methods


Class Details

[line 25]
The main class

All widgets should extend this class. It offers representation render thu templates (skins suported) and access control.




Tags:

tutorial:  Creating Widgets
version:  $Revision: 1.30 $
author:  Nicolas Cesar <ncesar@lunix.com.ar>


[ Top ]


Class Variables

$attributes = array()

[line 32]

Attributes stores the constructor's parameter $attrs


Type:   mixed


[ Top ]

$HTMLfields = array()

[line 66]

Substitution in template file.

similar to $RAWfields, Ex.

$this->attributes['WIDTH'] = "200" ;

$this->HTMLfields = array ('WIDTH');

the replacement in tpl:

{WIDTH} -> WIDTH="200"

else will be empty.

Note this is to avoid WIDTH="" which is not HTML complient




Tags:


Type:   mixed


[ Top ]

$RAWfields = array()

[line 44]

Substitution in template file.

Ex. if $this->RAWfields=array('TEXT','DATA'); template file should have {TEXT} and {DATA} somewhere

and what's in $this->attributes['TEXT'] and $this->attributes['DATA'] will do the replace in template



Type:   mixed


[ Top ]

$tpl =

[line 85]

Template

BIF3 uses PEAR's Sigma templates, each widget has it's own template object to render it's representation



Type:   mixed


[ Top ]

$warning =

[line 96]

Holds a BifWarning in case of trouble

In case there is a problem,

$this->warning=&new BifWarning(array('TEXT'=>'Error 404')) should be used to center all errors in the BifWarning class (for bugreporting for example)



Type:   mixed


[ Top ]

$widgetName =

[line 77]

Widget Name

is used to get template file among others thing

If is not specified will be: get_class($this)

NOTE: class name will be in lowercase



Type:   mixed


[ Top ]



Class Methods


constructor BifWidget [line 99]

BifWidget BifWidget( [mixed $attrs = array()])



[ Top ]

method draw [line 109]

void draw( )



Overridden in child classes as:

AuthStatus::draw()
BifRawText::draw()
FromDotBif::draw()

[ Top ]

method getWidget [line 256]

void &getWidget( mixed $name)



Overridden in child classes as:

BifContainer::getWidget()

[ Top ]

method hasAccess [line 207]

void hasAccess( [mixed $question = ''])



[ Top ]

method innerDraw [line 265]


method isCorrectLang [line 193]

void isCorrectLang( [mixed $lang = ''])



[ Top ]

method parseStructures [line 156]

void parseStructures( )



[ Top ]

method show [line 150]

void show( )



[ Top ]

method _BifWidget [line 250]

void _BifWidget( )



[ Top ]


Documentation generated on Wed, 10 Nov 2004 19:42:10 -0300 by phpDocumentor 1.2.3