events
Packages
Interfaces
Classes
Files

Class: Contribution

Source Location: /events/contribution.class.php [line 42]

Class Overview

Event
   |
   --Contribution
This class represents a contribution made by a user to complete the content of the website. All the contributions are managed in the contribution panel.

Author(s):



Class Details

This class represents a contribution made by a user to complete the content of the website. All the contributions are managed in the contribution panel.

Tags:

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


Class Methods

constructor Contribution [line 47]

Contribution Contribution( )
Builds a Contribution object.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method build [line 74]

void build( int $id, string $entitled, $description, string $fixing_url, int $module, $status, Date $creation_date, Date $fixing_date, mixed[] $auth, int $poster_id, int $fixer_id, int $id_in_module, string $identifier, string $type, [string $poster_login = ''], [string $fixer_login = ''])
Builds a contribution object from its whole parameters.
Overrides Event::build() (Builds an event object from its whole parameters.)

Parameters:

int   $id   Contribution id.
string   $entitled   Contribution entitled.
string   $fixing_url   URL associated to the event.
int   $module   status Contribution status.
Date   $creation_date   Contribution creation date.
Date   $fixing_date   Contribution fixing date.
mixed[]   $auth   Auth array determining the people who can treat the contribution.
int   $poster_id   Contribution creator id.
int   $fixer_id   Contribution fixer id.
int   $id_in_module   Id of the element associated to the contribution.
string   $identifier   Contribution identifier.
string   $type   Contribution type.
string   $poster_login   Login of the poster of the contribution.
string   $fixer_login   Login of the fixer of the contribution.
   $description  
   $status  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_auth [line 228]

mixed[] get_auth( )
Gets the authorization of treatment of this contribution.

Tags:

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

method get_description [line 201]

string get_description( )
Gets the description of the contribution.

Tags:

  • return: the description
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_fixer_id [line 246]

int get_fixer_id( )
Gets the identifier of the fixer.

Tags:

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

method get_fixer_login [line 264]

string get_fixer_login( )
Gets the fixer login.

Tags:

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

method get_fixing_date [line 219]

The get_fixing_date( )
Gets the contribution fixing date.

Tags:

  • return: date at which the contribution has been treated.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_module [line 210]

string get_module( )
Gets the module in which the contribution is used.

Tags:

  • return: The module identifier (for example the name of its folder).
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_module_name [line 292]

string get_module_name( )
Gets the name of the module in which the contribution is used.

Tags:

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

method get_poster_id [line 237]

int get_poster_id( )
Gets the identifier of the poster.

Tags:

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

method get_poster_login [line 255]

string get_poster_login( )
Gets the poster login.

Tags:

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

method get_status_name [line 273]

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

Tags:

  • return: The status name.
Overrides Event::get_status_name() (Gets the event status name. It's automatically translated in the user language.)
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_auth [line 149]

void set_auth( mixed[] $auth)
Sets the authorization of the contribution. It will determine who will be able to treat the contribution.

Parameters:

mixed[]   $auth   Auth array.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_description [line 191]

void set_description( string $description)
Sets the description of the contribution.

Parameters:

string   $description   Description (can be some HTML content).
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_fixer_id [line 175]

void set_fixer_id( int $fixer_id)
Sets the id of the fixer.

Parameters:

int   $fixer_id   Id.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_fixing_date [line 106]

void set_fixing_date( Date $date)
Sets the fixing date.

Parameters:

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

method set_module [line 97]

void set_module( string $module)
Sets the module in which the contribution is used.

Parameters:

string   $module   Module identifier (for example the name of the module folder).
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_poster_id [line 159]

void set_poster_id( int $poster_id)
Sets the id of the poster.

Parameters:

int   $poster_id   Id.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_status [line 121]

void set_status( int $new_current_status)
Set the status of the contribution.
Overrides Event::set_status() (Set the status of the event.)

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 ]


Class Variables

[line 329]   array  $auth  = array()

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 311]   string  $description 

Tags:

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

Tags:

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

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 323]   Date  $fixing_date 

Tags:

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

Tags:

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

Tags:

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

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

Inherited Methods

Class: Event

Event::Event()
Builds an Event object.
Event::build()
Builds an event object from its whole parameters.
Event::get_creation_date()
Returns the creation date of the event.
Event::get_entitled()
Returns the entitled of the event.
Event::get_fixing_url()
Returns the URL corresponding to the alert.
Event::get_id()
Gets the id of the event (in the event data base).
Event::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.
Event::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.
Event::get_must_regenerate_cache()
Gets the value indicating if the cache must be generated.
Event::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>
Event::get_status_name()
Gets the event status name. It's automatically translated in the user language.
Event::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.
Event::set_creation_date()
Sets the creation date of the event.
Event::set_entitled()
Sets the entitled of the event. The entitled can be considered as the name, it must be explicit.
Event::set_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.
Event::set_id()
Sets the id of the event. The id is the corresponding data base entry one.
Event::set_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.
Event::set_id_in_module()
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.
Event::set_must_regenerate_cache()
Sets a private property indicating if the changes made on this event imply the regeneration of the events cache.
Event::set_status()
Set the status of the event.
Event::set_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.


Documentation generated on Tue, 28 Jul 2009 22:43:36 +0200 by phpDocumentor 1.4.1