## P4A

Description

THE APPLICATION.

Stands for the currently running istance of the application.

- author: Andrea Giardina <andrea.giardina@crealabs.it>
- author: Fabrizio Balliano <fabrizio.balliano@crealabs.it>

Located in /p4a/objects/p4a.php (line 46)

    P4A_Object
       |
       --P4A

Variable Summary
object object $active_mask
object object $active_object
boolean $handheld
i18n $i18n
boolean $internet_explorer
array $libraries
object object $masks
object object $masks_history
array $objects
array $timer
string $title
integer $_action_history_id
array $_css
array $_javascript
Method Summary
void addCss (string $uri, [string $media = "screen"])
void addJavascript (string $uri)
void close ()
void dropCss (string $uri, [string $media = "screen"])
void dropJavascript (string $uri)
void dumpTimer ()
integer getActionHistoryId ()
void &getObject (mixed $object_id)
void &getPrevMask ()
string getTitle ()
void init ()
void initTimer ()
void isHandheld ()
void isInternetExplorer ()
void main ()
void maskExists (string $mask_name)
void &openMask (mixed $mask_name)
void p4a ()
void restart ()
void setActiveMask (string $mask_name)
void setActiveObject (object object &$object)
void setTitle (string $title)
void showPrevMask ()
void &singleton ([mixed $class_name = "p4a"])
void store (object object &$object)
void timer ([string $description = 'TIMER'])
Variables
object object $active_mask = NULL (line 69)

Pointer to the currently active mask.

- access: public

object object $active_object = NULL (line 62)

The currently active object.

This means that here is the pointer to the last object that has triggered an event/action.

- access: public

boolean $handheld = false (line 134)

Is the browser a handheld?

- access: private

i18n $i18n = array() (line 91)

I18n objects and methods.

- see: P4A_I18N
- access: public

boolean $internet_explorer = false (line 141)

Is the browser Internet Explorer?

- access: private

array $libraries = array() (line 106)

Loaded libraries registry.

A library is a file in P4A_APPLICATION_LIBRARIES_DIR wich is included every time.

- access: private

object object $masks = null (line 83)

Opened masks are stored here.

- access: public

object object $masks_history = array() (line 76)

History of opened masks

- access: public

array $objects = array() (line 53)

All P4A objects are stored here.

- access: public

array $timer = array() (line 113)

Timers container.

- access: private

string $title = NULL (line 98)

Application's title.

- access: private

integer $_action_history_id = 0 (line 148)

Counter to avoid browser's back/forward

- access: private

array $_css = array() (line 120)

CSS container.

- access: private

array $_javascript = array() (line 127)

javascript container.

- access: private

#### Inherited Variables

Inherited from P4A_Object

> P4A_Object::$_id
> P4A_Object::$_map_actions
> P4A_Object::$_name
> P4A_Object::$_objects
> P4A_Object::$_parent_id

Methods
addCss (line 509)

Include CSS

- access: public

void addCss (string $uri, [string $media = "screen"])

- string $uri: The URI of CSS.
- string $media: The CSS media.

addJavascript (line 538)

Include a javascript file

- access: public

void addJavascript (string $uri)

- string $uri: The URI of file.

close (line 215)

Destroys P4A data.

- access: public

void close ()
dropCss (line 523)

Drop inclusion of CSS file

- access: public

void dropCss (string $uri, [string $media = "screen"])

- string $uri: The URI of CSS.
- string $media: The CSS media.

dropJavascript (line 548)

Drop inclusion of javascript file

- access: public

void dropJavascript (string $uri)

- string $uri: The URI of CSS.

dumpTimer (line 262)

Prints out all timer values.

- access: public

void dumpTimer ()
getActionHistoryId (line 560)

Action history ID is used to avoid browser's back/forward

- access: public

integer getActionHistoryId ()
getObject (line 474)
void &getObject (mixed $object_id)
getPrevMask (line 434)

Gets an instance of the previous mask

- access: public

void &getPrevMask ()
getTitle (line 498)

Returns the title for the application.

- access: public

string getTitle ()
init (line 273)

Executes the initialization method of the object.

- access: private

void init ()
initTimer (line 237)

Inits the timer.

- access: public

void initTimer ()
isHandheld (line 192)
void isHandheld ()
isInternetExplorer (line 187)
void isInternetExplorer ()
main (line 289)

Executes the main cicle.

- access: public

void main ()
maskExists (line 449)

Checks if the desidered mask is in the masks collection.

- access: private

void maskExists (string $mask_name)

- string $mask_name: The mask's name.

openMask (line 396)

Opens a mask ed sets it active.

- access: public

void &openMask (mixed $mask_name)
p4a (line 154)

Class constructor.

- access: private

void p4a ()
restart (line 227)

Calls close() and then restart the application.

void restart ()
setActiveMask (line 374)

Sets the desidered mask as active.

- access: private

void setActiveMask (string $mask_name)

- string $mask_name: The name of the mask.

setActiveObject (line 386)

Sets the desidered object as active.

- see: P4A::$active_object
- access: private

void setActiveObject (object object &$object)

- object object &$object: The object

setTitle (line 488)

Sets the title for the application.

- access: public

void setTitle (string $title)

- string $title: Mask title.

showPrevMask (line 422)

Sets the previous mask the active mask

- access: public

void showPrevMask ()
singleton (line 201)
void &singleton ([mixed $class_name = "p4a"])
store (line 463)

Adds an object to the objects collection.

- access: private

void store (object object &$object)

- object object &$object: The object.

timer (line 250)

Takes a time snapshot with a given description.

- access: public

void timer ([string $description = 'TIMER'])

- string $description: The description

#### Inherited Methods

Inherited From P4A_Object

> P4A_Object::actionHandler()
> P4A_Object::build()
> P4A_Object::destroy()
> P4A_Object::errorHandler()
> P4A_Object::getId()
> P4A_Object::getName()
> P4A_Object::getObjectType()
> P4A_Object::getParentID()
> P4A_Object::implementMethod()
> P4A_Object::intercept()
> P4A_Object::isActionTriggered()
> P4A_Object::p4a_object()
> P4A_Object::setName()
> P4A_Object::setParentID()
> P4A_Object::void()

Documentation generated on Fri, 26 May 2006 12:43:29 +0200 by phpDocumentor 1.3.0RC5