Core  3.2
PHP API documentation
 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 
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 }
if(ActionRouter::inMaintenance()) $auth
Definition: authent.php:15
static inMaintenance()
const DEFAULT_PUBDIR
Definition: Lib.Prefix.php:28
getMainAction($auth, &$action)
Definition: Lib.Main.php:21
__construct(Account &$account, Authenticator &$auth=null)
global $_SERVER
executeAction(&$capturedOutput=null)
$account
Definition: guest.php:36
← centre documentaire © anakeen