Module.php 665 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. ###
  3. # @name Module
  4. # @author Tobias Reich
  5. # @copyright 2014 by Tobias Reich
  6. ###
  7. if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
  8. class Module {
  9. protected $plugins = null;
  10. protected function plugins($name, $location, $args) {
  11. if (!isset($this->plugins, $name, $location, $args)) return false;
  12. # Parse
  13. $location = ($location===0 ? 'before' : 'after');
  14. # Call plugins
  15. $this->plugins->activate($name . ":" . $location, $args);
  16. return true;
  17. }
  18. public static function dependencies($available = false) {
  19. if ($available===false) exit('Error: Can not execute function. Missing parameters or variables.');
  20. }
  21. }
  22. ?>