Core
3.2
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
Class.ActionRouter.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @package FDL
5
*/
6
7
require_once (
'WHAT/autoload.php'
);
8
9
include_once (
'WHAT/Lib.Main.php'
);
10
11
class
ActionRouter
12
{
13
/**
14
* @var Action
15
*/
16
private
$action = null;
17
18
public
function
__construct
(
Account
&
$account
,
Authenticator
&
$auth
= null)
19
{
20
global $action;
21
$this->action = null;
22
$_SERVER
[
'PHP_AUTH_USER'
] = $account->login;
23
getMainAction
(
$auth
, $this->action);
24
$action = $this->action;
25
}
26
27
public
function
getAction
()
28
{
29
return
$this->action;
30
}
31
32
public
static
function
inMaintenance
()
33
{
34
return
file_exists(
DEFAULT_PUBDIR
. DIRECTORY_SEPARATOR .
'maintenance.lock'
);
35
}
36
37
public
function
executeAction
(&$capturedOutput = null)
38
{
39
executeAction
($this->action, $capturedOutput);
40
}
41
}
ActionRouter
Definition:
Class.ActionRouter.php:11
$auth
if(ActionRouter::inMaintenance()) $auth
Definition:
authent.php:15
ActionRouter\inMaintenance
static inMaintenance()
Definition:
Class.ActionRouter.php:32
Account
Definition:
Class.Account.php:31
DEFAULT_PUBDIR
const DEFAULT_PUBDIR
Definition:
Lib.Prefix.php:28
Authenticator
Definition:
Class.Authenticator.php:19
getMainAction
getMainAction($auth, &$action)
Definition:
Lib.Main.php:21
ActionRouter\getAction
getAction()
Definition:
Class.ActionRouter.php:27
ActionRouter\__construct
__construct(Account &$account, Authenticator &$auth=null)
Definition:
Class.ActionRouter.php:18
$_SERVER
global $_SERVER
Definition:
cleanContext.php:41
ActionRouter\executeAction
executeAction(&$capturedOutput=null)
Definition:
Class.ActionRouter.php:37
$account
$account
Definition:
guest.php:36
← centre documentaire
© anakeen