Source API for the «PorteRecordEvents» class
Methods used the manage and call events at record instance level.
PHP magic methods
- __construct
-
This method is not yet documented.
Public methods
- connect
-
Connect a listener callback to a given event key.
Registering a function listener:
$user->connect('record_create_before','beforeOnCreateListener');Registering a method listener:
$user->connect('record_create_before',array($listener,'beforeOnCreateListener')); -
- return
- string
- A unique key defining the registered event
- disconnect
-
The method disconnect instance level events. You may as well disconnect static events but only by passing the key as an argument.
There are two ways to disconnect an event, either using the same parameters as the one used when connecting the event or using the key returned by the "connect" method.
Disconnecting an instance event using the same parameters:
$user->connect('action',object,'method'); $user->disconnect('action',object,'method');Disconnecting an instance event using the returned key:
$event = $user->connect('action',object,'method'); $user->disconnect($event); -
- return
- boolean
- on success
- call
-
This method is not yet documented.