You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lychee/php/modules/Module.php

37 lines
665 B

<?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;
}
public static function dependencies($available = false) {
if ($available===false) exit('Error: Can not execute function. Missing parameters or variables.');
}
}
?>