Permalink
ec84461 Oct 12, 2014
63 lines (56 sloc) 1.66 KB
<?php
namespace SimpleUser;
class UserEvents
{
/**
* The user.before-insert event is thrown before saving a new user to the database.
*
* The event listener receives a SimpleUser\UserEvent instance.
*
* Note that at this point, the User doesn't have an ID yet,
* because the ID hasn't been auto-generated by the database.
*
* @var string
*/
const BEFORE_INSERT = 'user.before-insert';
/**
* The user.after-insert event is thrown after saving a new user to the database.
*
* The event listener receives a SimpleUser\UserEvent instance.
*
* @var string
*/
const AFTER_INSERT = 'user.after-insert';
/**
* The user.before-update event is thrown before updating a user in the database.
*
* The event listener receives a SimpleUser\UserEvent instance.
*
* @var string
*/
const BEFORE_UPDATE = 'user.before-update';
/**
* The user.after-update event is thrown after updating a user in the database.
*
* The event listener receives a SimpleUser\UserEvent instance.
*
* @var string
*/
const AFTER_UPDATE = 'user.after-update';
/**
* The user.before-delete event is thrown before deleting a user from the database.
*
* The event listener receives a SimpleUser\UserEvent instance.
*
* @var string
*/
const BEFORE_DELETE = 'user.before-delete';
/**
* The user.after-delete event is thrown after deleting a user from the database.
*
* The event listener receives a SimpleUser\UserEvent instance.
*
* @var string
*/
const AFTER_DELETE = 'user.after-delete';
}