class Event extends Event implements Serializable

A general BZiON event

Events can be serialized using PHP's serialize() and unserialize() functions. Class properties present as parameters to the constructor are serialized and unserialized - if you provide type hinting for a model, only its ID (and type, if necessary) is stored. This means that you shouldn't change the parameter names or non-abstract model type hints without writing the appropriate database migrations first.

Methods

serialize()

Serialize an event so that it can be stored in the database

unserialize(string $data)

Call the event's constructor using serialized data

notify(string $type)

Send a notification to the players affected by this event

Details

at line line 28
serialize()

Serialize an event so that it can be stored in the database

at line line 70
unserialize(string $data)

Call the event's constructor using serialized data

Parameters

string $data

at line line 139
notify(string $type)

Send a notification to the players affected by this event

Parameters

string $type The type of the event