Module.php 641 B

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