MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
mhandler.class
Ir para a documentação deste ficheiro.
1<?php
7{
11 protected $manager;
12
16 protected $module;
17
21 protected $path;
22
26 protected $theme;
27
39 {
40 $this->manager = $manager;
41 $this->module = $module;
42 $this->path = $this->manager->getConf('home.modules') . '/' . $module . '/handlers/';
43 }
44
52 function init()
53 {
54 }
55
65 function dispatch($handler)
66 {
67 global $context, $module, $action, $item, $session, $page, $auth, $perms, $navbar, $theme, $history, $self, $url;
68
70 $context = $this->manager->context ? $this->manager->context : new MContext();
71 $module = $context->module;
72 $action = $context->action;
73 $self = $context->action;
74 $item = $context->GetVar('item');
75 $session = $this->manager->session;
76 $page = $this->manager->page;
77 $url = $this->manager->GetCurrentURL();
78 $theme = $this->manager->theme ? $this->manager->theme : new MTheme($MIOLO->getConf('theme.main'));
79 $auth = $this->manager->auth;
80 $perms = $this->manager->perms;
81 $navbar = $theme->GetElement('navigation');
82 $navbar = $navbar ? $navbar : new MNavigationBar();
83 $history = $this->manager->history;
84
85 $this->manager->Trace("Handler:dispatch: $handler");
86
87 $file = $this->path . $handler . '.inc';
88
89 if ( $return = file_exists($file) )
90 {
91 include ($file);
92 }
93
94 return $return;
95 }
96}
97?>
__construct($manager, $module)
Definição mhandler.class:38
dispatch($handler)
Definição mhandler.class:65
$action
Definição base.php:4
$url
Definição base.php:2