Abstract Class P4A_Object

Description

The base class extended by every p4a object.

Keeps object identifiers (id, name) and any method for event triggering.

Located in /p4a/p4a_object.php (line 43)


	
			
Direct descendents
Class Description
Abstract class P4A_Data_Source
 class P4A_Collection
Abstract class P4A_Widget Base class for objects that permit user interation with the application.
 class P4A_Data_Field Every DATA_SOURCE field is a DATA_FIELD.
 class P4A THE APPLICATION.
 class P4A_Mask The mask is the basic interface object wich contains all widgets and generically every displayed object.
Variable Summary
 array $_helpers
 string $_id
 string $_name
 array $_objects
 string $_parent_id
Method Summary
 P4A_Object __construct ([string $name = null], [string $prefix = 'obj'], [string $id = null])
 void actionHandler (string $action)
 P4A_Object build (string $class, string $name)
 void destroy ([ $name = null])
 P4A_Object dropImplement (string $action)
 P4A_Object dropMethod (string $action)
 unknown errorHandler (string $action, [mixed $param = null])
 string getId ()
 string getName ()
 string getObjectType ()
 string getParentID ()
 P4A_Object implement (string $action, object $object, [string $method = null])
 P4A_Object intercept (object $object, string $action, [string $method = null])
 boolean isActionTriggered (string $action)
 P4A_Object setName (string $name)
 P4A_Object setParentID (string $object_id)
 unknown void ([mixed $params = null])
 void _loadHelper (string $name)
 unknown __call (string $name, mixed $args)
Variables
array $_helpers = array() (line 75)

helpers cache

  • access: protected
string $_id = null (line 48)
  • access: protected
array $_map_actions = array() (line 64)

Keeps the association between an action and its listener

  • access: protected
string $_name = null (line 58)
  • access: protected
array $_objects = array() (line 69)
  • access: protected
string $_parent_id = null (line 53)
  • access: protected
Methods
Constructor __construct (line 82)
  • access: public
P4A_Object __construct ([string $name = null], [string $prefix = 'obj'], [string $id = null])
  • string $name: Object identifier, when you add an object to another object (such as $p4a) you can access to it by $p4a->object_name
  • string $prefix: Prefix string for ID generation
  • string $id: Object ID identifies an object in the $p4a's object collection. You can set a static ID if you want that all clients uses the same ID (tipically for web sites).

Redefined in descendants as:
actionHandler (line 191)

Handle an action implemented by the object

  • access: public
void actionHandler (string $action)
  • string $action
build (line 99)

Instance a new $class ojbect and sets its name to $name

P4A_Object build (string $class, string $name)
  • string $class
  • string $name
destroy (line 149)

Destroys the object Retrieves all children objects and destroy them.

  • access: public
void destroy ([ $name = null])
  • $name
dropImplement (line 255)

Removes handling an action

  • access: public
P4A_Object dropImplement (string $action)
  • string $action
dropMethod (line 245)

alias for dropImplement

P4A_Object dropMethod (string $action)
  • string $action
errorHandler (line 293)

Handle an error action implemented by the object.

Checks if the the specified action is triggered and calls it, if the action is not triggered calls the general error handler for the object.

  • access: public
unknown errorHandler (string $action, [mixed $param = null])
  • string $action
  • mixed $param: Parameter(s) that will be passed to the error handler
getId (line 140)
  • access: public
string getId ()
getName (line 182)
  • access: public
string getName ()
getObjectType (line 279)

Returns the "CLASS" type of the object.

  • access: public
string getObjectType ()
getParentID (line 132)
  • access: public
string getParentID ()
implement (line 225)

Tells the current object to execute a method on another object when an action is called

  • access: public
P4A_Object implement (string $action, object $object, [string $method = null])
  • string $action: The action's name
  • object $object: The object that will intercept the action
  • string $method: The method that will be called
intercept (line 212)

Tells an object to execute a method on the current object when an action is called

  • access: public
P4A_Object intercept (object $object, string $action, [string $method = null])
  • object $object
  • string $action: The action triggered by an event
  • string $method: The method that will be executed
isActionTriggered (line 267)
  • access: public
boolean isActionTriggered (string $action)
  • string $action
setName (line 173)
  • access: protected
P4A_Object setName (string $name)
  • string $name
setParentID (line 123)
  • access: protected
P4A_Object setParentID (string $object_id)
  • string $object_id
void (line 332)

just a placeholder

  • access: public
unknown void ([mixed $params = null])
  • mixed $params
_loadHelper (line 340)
  • access: protected
void _loadHelper (string $name)
  • string $name
__call (line 375)
  • access: private
unknown __call (string $name, mixed $args)
  • string $name
  • mixed $args

Documentation generated on Tue, 02 Sep 2008 10:04:05 +0200 by phpDocumentor 1.4.2