ui 
[ doc home ] [ class tree: ui ] [ index: ui ] [ all elements ]

Class: IsterUIView

Source Location: /IsterUIView.php

Class Overview

IsterObject
   |
   --IsterAttributeSet
      |
      --IsterFilterOwner
         |
         --IsterUIBase
            |
            --IsterUIView

This class represents a view.


Author(s): Ingo Schramm   

Copyright: Copyright (c) 2005 Ister.ORG Ingo Schramm

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: IsterUIBase

IsterUIBase::IsterUIBase()
Constructor
IsterUIBase::catString()
Concat $str parameter to $this->string property.
IsterUIBase::getApplication()
Get the objet's IsterAppMain object.
IsterUIBase::getFramework()
Get the objet's IsterUIFramework object.
IsterUIBase::getName()
Get the objet's name.
IsterUIBase::getRequired()
Returns bitmask of required objects.
IsterUIBase::getSqlFunction()
Get the objet's IsterSqlFunction object.
IsterUIBase::getTemplate()
Get the objet's IsterTemplate object.
IsterUIBase::hasTemplate()
IsterUIBase::setApplication()
Set the application object.
IsterUIBase::setDescription()
Set the description object.
IsterUIBase::setFramework()
Set the objet's IsterUIFramework object.
IsterUIBase::setName()
Set the object's name
IsterUIBase::setSqlFunction()
Set the objet's IsterSqlFunction object.
IsterUIBase::setTemplate()
Set the objet's IsterTemplate object.
IsterUIBase::test()
Test if some objects exist.
IsterUIBase::toString()
Return a string representation of this object.

Class: IsterFilterOwner

IsterFilterOwner::IsterFilterOwner()
Constructor
IsterFilterOwner::apply()
Apply all filters in order of definition.
IsterFilterOwner::deleteFilter()
Delete a filter.
IsterFilterOwner::getFilter()
Get a filter.
IsterFilterOwner::getFilterNames()
Get an array with all filter names.
IsterFilterOwner::hasFilters()
Return number of filters.
IsterFilterOwner::setFilter()
Add an IsterBufferFilter.

Class: IsterAttributeSet

IsterAttributeSet::IsterAttributeSet()
Constructor
IsterAttributeSet::addAttribute()
depricated
IsterAttributeSet::addAttributeReference()
depricated
IsterAttributeSet::addAttributesArray()
depricated
IsterAttributeSet::delete()
Delete all attributes.
IsterAttributeSet::deleteAttribute()
Delete an aAttribute.
IsterAttributeSet::getAttribute()
Get the value of an attribute.
IsterAttributeSet::getAttributeNames()
Return an array containing the names of all attributes.
IsterAttributeSet::getAttributeReference()
Get the reference value of an attribute.
IsterAttributeSet::getAttributesArray()
Get all attributes.
IsterAttributeSet::hasAttribute()
Check whether an attribute has been set.
IsterAttributeSet::setAttribute()
Set a new attribute or overwrite an already existing attribute.
IsterAttributeSet::setAttributeReference()
Set an attribute and store only a reference of the attribute.
IsterAttributeSet::setAttributesArray()
Set an array of key value pairs, each pair an attribute.

Class: IsterObject

IsterObject::IsterObject()
Constructor
IsterObject::abstractMethodError()
Report attempt to call an abstract method.
IsterObject::addLogger()
Add an IsterLogger to process log messages.
IsterObject::deleteLogger()
Delete an already registered IsterLogger.
IsterObject::getLoggerNames()
Fetch the names of all currently registered IsterLoggers.
IsterObject::getMem()
Return maximum amount of memory an application has allocated at this point.
IsterObject::log()
Trigger a log message.
IsterObject::passPHPmessage()
Catch PHP E_WARNING and E_NOTICE messages.
IsterObject::serialize()
Serialize the object.
IsterObject::setLogLocal()
Set logging local for the current object.
IsterObject::setupLogger()
Setup a logger.
IsterObject::triggerError()
Alias for log();
IsterObject::unserialize()
Unserialize the object.
IsterObject::__sleep()
Executed prior to serialize().
IsterObject::__wakeup()
Executed prior to unserialize().

Class Details

This class represents a view.

An IsterUIView creates automatically component objects by XML description and calls their toString() method in the proper order. Each component is capable to own an IsterTemplate which is also automatically created. Components must be subclasses of IsterUIBase.

Created templates will be setup with a language and an include path. As of version 0.4.0, if you want to do further setup to the templates, you have to extend the component objects and overwrite their setTemplate() method. Don't forget to call parent::setTemplate() first and then work on $this->tmpl to do setup. Future versions may be capable to do more setup on templates by XML description.

If a component requires an IsterSqlFunction and no function was defined in the description the parent's IsterSqlFunction will be passed to the component. If a component has no parent component, the function set to this view will be passed.

Example:

  1. // create request object
  2. $request = new IsterHttpRequestGET; / or IsterHttpRequestPOST
  3. $request->parseToAttributes();
  4. // create description
  5. $fac = new IsterUIDescFactory();
  6. $descr = $fac->get(ISTER_UI_VIEW);
  7. $descr->setSource( realpath('view.xml') );
  8. // create view, setup view, execute view
  9. $view = new IsterUIView;
  10. $view->setRequest($request);
  11. $view->setDescription( $descr );
  12. $view->run();
  13. // print resulting string
  14. print $view->toString();


copyright:  Copyright (c) 2005 Ister.ORG Ingo Schramm
author:  Ingo Schramm
see:  IsterUIBase::IsterUIBase(), IsterUIComponent, IsterUIFormConnector


[ Top ]


Class Methods


constructor IsterUIView

IsterUIView IsterUIView( )

Constructor

[ Top ]

method newComponent

boolean newComponent( $array $comp)

Callback called by IsterUIViewDescExpat

Parameters:

$array   $comp  

[ Top ]

method newFilter

boolean newFilter( $array $filt)

Callback called by IsterUIViewDescExpat

Parameters:

$array   $filt  

[ Top ]

method newFunction

boolean newFunction( $array $func)

Callback called by IsterUIViewDescExpat

Parameters:

$array   $func  

[ Top ]

method newSql

boolean newSql( $array $sql)

Callback called by IsterUIViewDescExpat

Parameters:

$array   $sql  

[ Top ]

method newTemplate

boolean newTemplate( $array $tmpl)

Callback called by IsterUIViewDescExpat

Parameters:

$array   $tmpl  

[ Top ]

method run

boolean run( )

Execute this view.

[ Top ]

method toString

string toString( )

Return string representation of this view.

For subsequent components their names will be declared as new variables in the parent's template with the result of their toString() method as value.


Overrides IsterUIBase::toString() (Return a string representation of this object.)

[ Top ]


Documentation generated on Tue, 20 Dec 2005 11:21:34 +0100 by phpDocumentor 1.3.0RC4