A tumblelog CMS built on AJAX, PHP and MySQL.

plugins.class.php 718B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. if (!defined('entry') || !entry) {
  3. die('Not a valid page');
  4. }
  5. /* ===========================
  6. gelato CMS - A PHP based tumblelog CMS
  7. development version
  8. http://www.gelatocms.com/
  9. gelato CMS is a free software licensed under the GPL 2.0
  10. Copyright (C) 2007 by Pedro Santana <pecesama at gmail dot com>
  11. =========================== */
  12. ?>
  13. <?php
  14. /* Simulating a class static property */
  15. $GLOBALS['plugins::$instances'] = array();
  16. class plugins
  17. {
  18. public function addAction($name, $function)
  19. {
  20. $plugEngine =& plugin::instance(); //DO NOT remove the & after the =
  21. $plugEngine->actions[$name][] = array($this, $function);
  22. }
  23. }
  24. ?>