class Site {
function Start() {}
- function Call($MODULE, $METHOD) {
+ function Call($MODULE, $METHOD, $ARGP=array()) {
$nCalls = 0;
if (file_exists(strtolower('site/'.$MODULE.'.php'))) {
require_once strtolower('site/'.$MODULE.'.php');
if (class_exists($MODULE)) {
- $page = new $MODULE($this, $METHOD);
+ $page = new $MODULE($this, $METHOD, $ARGP);
$page->Start();
$handlers = $page->get_handlers($METHOD);
switch ($METHOD) {
}
class Page {
- var $site, $method;
- function __construct($site, $method) {
+ var $site, $method, $argp;
+ function __construct($site, $method, $argp) {
$this->site = $site;
$this->method = $method;
+ $this->argp = $argp;
}
function get_handlers() {
$handlers = isset($this->handlers[$this->method]) ?
function Start() {}
function Call($handler, $argv) {
- if (is_callable(array($this, $handler)))
- return array(0, call_user_func_array(array($this, $handler), $argv));
- else return false;
+ if (is_callable(array($this, $handler))) {
+ return array(0, call_user_func(array($this, $handler), $argv));
+ } else {
+ return false;
+ }
}
function Finish() {}
}