mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
add method __invoke()
calls the function whose name is passed as $_GET['action']
This commit is contained in:
parent
ca32bc856e
commit
80f0499d1b
|
@ -25,17 +25,26 @@
|
|||
* @version Release: @package_version@
|
||||
*/
|
||||
class SeedDMS_View_Common {
|
||||
var $theme;
|
||||
protected $theme;
|
||||
|
||||
var $params;
|
||||
|
||||
// var $settings;
|
||||
protected $params;
|
||||
|
||||
function __construct($params, $theme='blue') {
|
||||
$this->theme = $theme;
|
||||
$this->params = $params;
|
||||
}
|
||||
|
||||
function __invoke($get=array()) {
|
||||
if(isset($get['action']) && $get['action']) {
|
||||
if(method_exists($this, $get['action'])) {
|
||||
$this->{$get['action']}();
|
||||
} else {
|
||||
echo "Missing action '".$get['action']."'";
|
||||
}
|
||||
} else
|
||||
$this->show();
|
||||
}
|
||||
|
||||
function setParams($params) {
|
||||
$this->params = $params;
|
||||
}
|
||||
|
@ -49,14 +58,7 @@ class SeedDMS_View_Common {
|
|||
unset($this->params[$name]);
|
||||
}
|
||||
|
||||
/*
|
||||
function setConfiguration($conf) {
|
||||
$this->settings = $conf;
|
||||
}
|
||||
*/
|
||||
|
||||
function show() {
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user