2014-04-04 19:27:10 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
###
|
|
|
|
# @name Module
|
|
|
|
# @author Tobias Reich
|
|
|
|
# @copyright 2014 by Tobias Reich
|
|
|
|
###
|
|
|
|
|
|
|
|
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
|
|
|
|
|
|
|
|
class Module {
|
|
|
|
|
|
|
|
protected $plugins = null;
|
|
|
|
|
|
|
|
protected function plugins($name, $location, $args) {
|
|
|
|
|
|
|
|
if (!isset($this->plugins, $name, $location, $args)) return false;
|
|
|
|
|
|
|
|
# Parse
|
|
|
|
$location = ($location===0 ? 'before' : 'after');
|
|
|
|
|
|
|
|
# Call plugins
|
|
|
|
$this->plugins->activate($name . ":" . $location, $args);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-04-26 15:00:31 +00:00
|
|
|
public function dependencies($available = false) {
|
2014-04-19 19:07:36 +00:00
|
|
|
|
2014-04-26 15:00:31 +00:00
|
|
|
if ($available===false) exit('Error: Can not execute function. Missing parameters or variables.');
|
2014-04-19 19:07:36 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-04-28 08:17:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|