A tumblelog CMS built on AJAX, PHP and MySQL.

plugins.class.php 621B

1234567891011121314151617181920212223242526
  1. <?php
  2. if (!defined('entry') || !entry) {
  3. die('Not a valid page');
  4. }
  5. /* ===========================
  6. Sorbet CMS - A PHP based tumblelog CMS forked from Gelato CMS
  7. Sorbet CMS is a free software licensed under the GPL 3.0
  8. =========================== */
  9. ?>
  10. <?php
  11. /* Simulating a class static property */
  12. $GLOBALS['plugins::$instances'] = array();
  13. class plugins
  14. {
  15. public function addAction($name, $function)
  16. {
  17. $plugEngine =& plugin::instance(); //DO NOT remove the & after the =
  18. $plugEngine->actions[$name][] = array($this, $function);
  19. }
  20. }
  21. ?>