Creates a new instance of the XOAD_Events_Storage_File class.
XOAD_Events_Storage_File
XOAD_Events_Storage_File
(string $dsn)
-
string
$dsn: The data source name and parameters to use when creating the instance.
Deletes old events from the container.
This method is called before calling filterEvents or filterMultipleEvents to delete all expired events from the container.
bool
cleanEvents
()
Redefinition of:
- XOAD_Events_Storage::cleanEvents()
- This method should be called from each successor to retrieve the start time of the old events in the storage.
Filters the events in the container using multiple criterias.
Valid keys for each event are:
- event - the event name (case-sensitive);
- className - the class that is the source of the event;
- filter - the event filter data (case-insensitive);
using this argument you can filter events with
the same name but with different filter data;
- time - the event start time (seconds since the Unix
Epoch (January 1 1970 00:00:00 GMT).
array
filterMultipleEvents
(array $eventsData)
-
array
$eventsData: Array containing associative arrays with information for each event.
Redefinition of:
- XOAD_Events_Storage::filterMultipleEvents()
- This method should be called from each successor to add common data to the event.
Gets the absolute path to the container.
string
getFileName
()
Retrieves a static instance of the XOAD_Events_Storage_File class.
This method overrides XOAD_Events_Storage::getStorage.
object A
&getStorage
(string $dsn)
-
string
$dsn: The data source name and parameters to use when retrieving the instance.
Redefinition of:
- XOAD_Events_Storage::getStorage()
- Retrieves an instanse to the configurated XOAD Events storage provider.
Posts multiple events to the container.
Valid keys for each event are:
- event - the event name (case-sensitive);
- className - the class that is the source of the event;
- sender - the sender object of the event;
- data - the data associated with the event;
- filter - the event filter data (case-insensitive);
using this key you can post events with
the same name but with different filter data;
the client will respond to them individually;
- time - the event start time (seconds since the Unix
Epoch (January 1 1970 00:00:00 GMT);
- lifetime - the event lifetime (in seconds);
bool
postMultipleEvents
(array $eventsData)
-
array
$eventsData: Array containing associative arrays with information for each event.
Redefinition of:
- XOAD_Events_Storage::postMultipleEvents()
- This method should be called from each successor to add common data to the event.
Callback to sort events by time.
int
sortEvents
(array $a, array $b)
-
array
$a: Data associated with the first event.
-
array
$b: Data associated with the second event.
Inherited Methods
Inherited From XOAD_Events_Storage
XOAD_Events_Storage::XOAD_Events_Storage()
XOAD_Events_Storage::cleanEvents()
XOAD_Events_Storage::filterEvents()
XOAD_Events_Storage::filterMultipleEvents()
XOAD_Events_Storage::getStorage()
XOAD_Events_Storage::postEvent()
XOAD_Events_Storage::postMultipleEvents()