aliro Class Reference

List of all members.

Public Member Functions

 classExists ($classname)
 requireClass ($classname)
 startup ()
 getElapsed ()
 getTimeMessage ()
 classExists ($classname)
 requireClass ($classname)
 startup ()
 getElapsed ()
 getTimeMessage ()

Static Public Member Functions

static getInstance ()
static getInstance ()

Public Attributes

 $installed = false

Private Attributes

 $timer = null

Static Private Attributes

static $instance = __CLASS__


Detailed Description

Definition at line 99 of file administrator/index.php.


Member Function Documentation

static aliro::getInstance (  )  [static]

aliro::classExists ( classname  ) 

Definition at line 112 of file administrator/index.php.

References smartAdminClassMapper::getInstance().

00112                                              {
00113         return smartAdminClassMapper::getInstance()->classExists($classname);
00114     }

aliro::requireClass ( classname  ) 

Definition at line 116 of file administrator/index.php.

References smartAdminClassMapper::getInstance().

00116                                               {
00117         smartAdminClassMapper::getInstance()->requireClass($classname);
00118     }

aliro::startup (  ) 

Definition at line 120 of file administrator/index.php.

References $_REQUEST, aliroErrorRecorder::getInstance(), aliroRequest::getInstance(), and smartAdminClassMapper::getInstance().

00120                                {
00121 
00122         $protects = array('_REQUEST', '_GET', '_POST', '_COOKIE', '_FILES', '_SERVER', '_ENV', 'GLOBALS', '_SESSION');
00123 
00124         foreach ($protects as $protect) {
00125             if ( in_array($protect , array_keys($_REQUEST)) ||
00126             in_array($protect , array_keys($_GET)) ||
00127             in_array($protect , array_keys($_POST)) ||
00128             in_array($protect , array_keys($_COOKIE)) ||
00129             in_array($protect , array_keys($_FILES))) {
00130                 die('Invalid Request.');
00131             }
00132         }
00133         if (false !== strpos($_SERVER['REQUEST_URI'], 'mosConfig_absolute_path')) die ('Invalid Request.');
00134 
00135         $abovedir = dirname(dirname(__FILE__));
00136         require_once ($abovedir.'/definitions.php');
00137 
00138         $filepath = _ALIRO_CLASS_BASE.'/configs/'.md5(_ALIRO_ABSOLUTE_PATH.'/configuration.php').'.php';
00139         if (file_exists($filepath) AND filesize($filepath) > 10 ) $this->installed = true;
00140 
00141         $thisdir = _ALIRO_CLASS_BASE._ALIRO_ADMIN_DIR;
00142         require_once (_ALIRO_CLASS_BASE.'/objectcache.php');
00143         $this->timer = new aliroProfiler();
00144         // The include path is needed for HTMLpurifier (will possibly serve for other extensions too):
00145         set_include_path(_ALIRO_CLASS_BASE.'/extclasses/'.PATH_SEPARATOR.get_include_path());
00146         require_once (_ALIRO_CLASS_BASE.'/extclasses/HTMLPurifier/Bootstrap.php');
00147         require_once (_ALIRO_CLASS_BASE.'/classloader.php');
00148         require_once ($thisdir.'/classloader.php');
00149         smartAdminClassMapper::getInstance();
00150         if (!$this->installed) {
00151             $newinstall = new aliroInstall();
00152             $newinstall->install();
00153             exit();
00154         }
00155         $controller = aliroRequest::getInstance();
00156         $errorhandler = aliroErrorRecorder::getInstance();
00157         set_error_handler(array($errorhandler, 'PHPerror'));
00158         new aliroJoomla();
00159         $controller->doControl();
00160     }

aliro::getElapsed (  ) 

Definition at line 162 of file administrator/index.php.

Referenced by getTimeMessage().

00162                                   {
00163         return $this->timer->getElapsed();
00164     }

aliro::getTimeMessage (  ) 

Definition at line 166 of file administrator/index.php.

References getElapsed(), and T_().

00166                                       {
00167         return sprintf(T_('Time to generate page %s seconds'), $this->getElapsed());
00168     }

static aliro::getInstance (  )  [static]

Definition at line 95 of file index.php.

References criticalInfo::getInstance().

00095                                           {
00096         if (!is_object(self::$instance)) {
00097             self::$instance = new self::$instance();
00098             $critical = criticalInfo::getInstance();
00099         }
00100         return self::$instance;
00101     }

aliro::classExists ( classname  ) 

Definition at line 103 of file index.php.

References smartClassMapper::getInstance().

00103                                              {
00104         return smartClassMapper::getInstance()->classExists($classname);
00105     }

aliro::requireClass ( classname  ) 

Definition at line 107 of file index.php.

References smartClassMapper::getInstance().

00107                                               {
00108         smartClassMapper::getInstance()->requireClass($classname);
00109     }

aliro::startup (  ) 

Definition at line 111 of file index.php.

References $_REQUEST, aliroErrorRecorder::getInstance(), aliroRequest::getInstance(), and smartClassMapper::getInstance().

00111                                {
00112 
00113         $protects = array('_REQUEST', '_GET', '_POST', '_COOKIE', '_FILES', '_SERVER', '_ENV', 'GLOBALS', '_SESSION');
00114 
00115         foreach ($protects as $protect) {
00116             if ( in_array($protect , array_keys($_REQUEST)) ||
00117             in_array($protect , array_keys($_GET)) ||
00118             in_array($protect , array_keys($_POST)) ||
00119             in_array($protect , array_keys($_COOKIE)) ||
00120             in_array($protect , array_keys($_FILES))) {
00121                 die('Invalid Request.');
00122             }
00123         }
00124         if (false !== strpos($_SERVER['REQUEST_URI'], 'mosConfig_absolute_path')) die ('Invalid Request.');
00125 
00126         require_once (dirname(__FILE__).'/definitions.php');
00127 
00128         $filepath = _ALIRO_CLASS_BASE.'/configs/'.md5(_ALIRO_ABSOLUTE_PATH.'/configuration.php').'.php';
00129         if (file_exists($filepath) AND filesize($filepath) > 10 ) $this->installed = true;
00130     
00131         require_once (_ALIRO_CLASS_BASE.'/objectcache.php');
00132         $this->timer = new aliroProfiler();
00133         // The include path is needed for HTMLpurifier (will possibly serve for other extensions too):
00134         set_include_path(_ALIRO_CLASS_BASE.'/extclasses/'.PATH_SEPARATOR.get_include_path());
00135         require_once (_ALIRO_CLASS_BASE.'/extclasses/HTMLPurifier/Bootstrap.php');
00136         require_once (_ALIRO_CLASS_BASE.'/classloader.php');
00137         smartClassMapper::getInstance();
00138         $this->classLoader = smartClassMapper::getInstance();
00139 
00140         $controller = aliroRequest::getInstance();
00141 
00142         $errorhandler = aliroErrorRecorder::getInstance();
00143         set_error_handler(array($errorhandler, 'PHPerror'));
00144         $controller->doControl();
00145     }

aliro::getElapsed (  ) 

Definition at line 147 of file index.php.

00147                                   {
00148         return $this->timer->getElapsed();
00149     }

aliro::getTimeMessage (  ) 

Definition at line 151 of file index.php.

References getElapsed(), and T_().

00151                                       {
00152         return sprintf(T_('Time to generate page %s seconds'), $this->getElapsed());
00153     }


Member Data Documentation

aliro::$instance = __CLASS__ [static, private]

Definition at line 100 of file administrator/index.php.

aliro::$timer = null [private]

Definition at line 101 of file administrator/index.php.

aliro::$installed = false

Definition at line 102 of file administrator/index.php.


The documentation for this class was generated from the following files:

Generated on Wed May 14 13:01:57 2008 for ALIRO by  doxygen 1.5.5