Base for a static organization website

CakeEventListener.php 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * For full copyright and license information, please see the LICENSE.txt
  8. * Redistributions of files must retain the above copyright notice.
  9. *
  10. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. * @link http://cakephp.org CakePHP(tm) Project
  12. * @package Cake.Observer
  13. * @since CakePHP(tm) v 2.1
  14. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  15. */
  16. /**
  17. * Objects implementing this interface should declare the `implementedEvents` function
  18. * to notify the event manager what methods should be called when an event is triggered.
  19. *
  20. * @package Cake.Event
  21. */
  22. interface CakeEventListener {
  23. /**
  24. * Returns a list of events this object is implementing. When the class is registered
  25. * in an event manager, each individual method will be associated with the respective event.
  26. *
  27. * ## Example:
  28. *
  29. * ```
  30. * public function implementedEvents() {
  31. * return array(
  32. * 'Order.complete' => 'sendEmail',
  33. * 'Article.afterBuy' => 'decrementInventory',
  34. * 'User.onRegister' => array('callable' => 'logRegistration', 'priority' => 20, 'passParams' => true)
  35. * );
  36. * }
  37. * ```
  38. *
  39. * @return array associative array or event key names pointing to the function
  40. * that should be called in the object when the respective event is fired
  41. */
  42. public function implementedEvents();
  43. }