events
Packages
Interfaces
Classes
Files

Class: Event

Source Location: /events/event.class.php [line 50]

Class Overview


It's the common part between two types of event existing now in PHPBoost:
  • User contribution managed into the contribution panel
  • Administrator alert, triggered for example when a new update is available or when a new member account is to approbate

Author(s):



Class Details

It's the common part between two types of event existing now in PHPBoost:
  • User contribution managed into the contribution panel
  • Administrator alert, triggered for example when a new update is available or when a new member account is to approbate

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor Event [line 55]

Event Event( )
Builds an Event object.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method build [line 277]

void build( int $id, string $entitled, string $fixing_url, int $current_status, Date $creation_date, int $id_in_module, string $identifier, string $type)
Builds an event object from its whole parameters.

Overridden in child classes as:

AdministratorAlert::build()
Builds an alert from its whole parameters.
Contribution::build()
Builds a contribution object from its whole parameters.

Parameters:

int   $id   The event id.
string   $entitled   The event entitled.
string   $fixing_url   The URL corresponding to the event.
int   $current_status   The event status.
Date   $creation_date   The creation date.
int   $id_in_module   The id of the object associated to the event.
string   $identifier   The event identifier.
string   $type   The event type.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_creation_date [line 205]

Date get_creation_date( )
Returns the creation date of the event.

Tags:

  • return: Creation date
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_entitled [line 173]

string get_entitled( )
Returns the entitled of the event.

Tags:

  • return: The entitled.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_fixing_url [line 182]

string get_fixing_url( )
Returns the URL corresponding to the alert.

Tags:

  • return: Relative URL whose first character is / for the website root.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_id [line 164]

int get_id( )
Gets the id of the event (in the event data base).

Tags:

  • return: The id.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_identifier [line 224]

string get_identifier( )
Gets the identifier of the event. To retrieve your event, you might need to have a field in which you put some informations, for example a hash or an identifier. It's that identifier which can be used to filter the events.

Tags:

  • return: The identifier of the event.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_id_in_module [line 214]

int get_id_in_module( )
Gets the id in the module. This value corresponds to the id of the daba base entry associated to the event.

Tags:

  • return: The id in the module.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_must_regenerate_cache [line 242]

bool get_must_regenerate_cache( )
Gets the value indicating if the cache must be generated.

Tags:

  • return: true if the cache has to be generated, false else.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_status [line 196]

int get_status( )
Gets the status of the event. The status is one of those elements: ul> <li>EVENT_STATUS_UNREAD if it's not read.</li> <li>EVENT_STATUS_BEING_PROCESSED if the event is beeing processed</li> <li>EVENT_STATUS_PROCESSED if the event is processed. </ul>

Tags:

  • return: Status
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_status_name [line 251]

The get_status_name( )
Gets the event status name. It's automatically translated in the user language.

Tags:

  • return: name of the event status, ready to be displayed.

Overridden in child classes as:

Contribution::get_status_name()
Gets the contribution status name. It's automatically translated in the user language, ready to be displayed.

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_type [line 233]

string get_type( )
Gets the type of the event. To retrieve your event, you might need to have a type of event, for example if your module has differents kinds of events. With this field, you can specify it.

Tags:

  • return: The type.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_creation_date [line 115]

void set_creation_date( Date $date)
Sets the creation date of the event.

Parameters:

Date   $date   The creation date
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_entitled [line 75]

void set_entitled( string $entitled)
Sets the entitled of the event. The entitled can be considered as the name, it must be explicit.

Parameters:

string   $entitled   The event entitiled.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_fixing_url [line 84]

void set_fixing_url( string $fixing_url)
Sets the URL corresponding to the event. For the contributions and the administrator alerts it's the number URL at which the problem can be solved.

Parameters:

string   $fixing_url   Relative URL (the first character must be / for the root of the site).
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_id [line 65]

void set_id( int $id)
Sets the id of the event. The id is the corresponding data base entry one.

Parameters:

int   $id   Id of the event.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_identifier [line 136]

void set_identifier( string $identifier)
Sets the event identifier. To retrieve your event, you might need to have a field in which you put some informations, for example a hash or an identifier. It's that identifier which can be used to filter the events. You don't have to use it, you can let it blank.

Parameters:

string   $identifier   Identifier of the event.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_id_in_module [line 126]

void set_id_in_module( int $id)
Sets the id in module parameter. It corresponds to the id of the element corresponding to the event in your data base tables. For example, il you use the events to allow user to purpose some news in your web site, it will be the id of the news added.

Parameters:

int   $id   Id in the module
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_must_regenerate_cache [line 154]

void set_must_regenerate_cache( bool $must)
Sets a private property indicating if the changes made on this event imply the regeneration of the events cache.

Parameters:

bool   $must   true if we must generate the events cache, otherwise false.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_status [line 98]

void set_status( int $new_current_status)
Set the status of the event.

Overridden in child classes as:

Contribution::set_status()
Set the status of the contribution.

Parameters:

int   $new_current_status   One of those elements:
  • EVENT_STATUS_UNREAD if it's not read.
  • EVENT_STATUS_BEING_PROCESSED if the event is beeing processed
  • EVENT_STATUS_PROCESSED if the event is processed.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_type [line 145]

void set_type( string $type)
Sets the type of the event. To retrieve your event, you might need to have a type of event, for example if your module has differents kinds of events. With this field, you can specify it.

Parameters:

string   $type   The type of your event.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 319]   Date  $creation_date 

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 313]   int  $current_status  =  EVENT_STATUS_UNREAD

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 301]   string  $entitled  =  ''

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 307]   string  $fixing_url  =  ''

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 295]   int  $id  =  0

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 332]   string  $identifier  =  ''

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 326]   int  $id_in_module  =  0

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 344]   bool  $must_regenerate_cache  =  true

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 338]   string  $type  =  ''

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
Documentation generated on Tue, 28 Jul 2009 22:43:36 +0200 by phpDocumentor 1.4.1