Updated some documentations
authorMatthias Schmidt <gravatronics@live.com>
Tue, 16 Aug 2011 07:24:21 +0000 (09:24 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 16 Aug 2011 07:24:21 +0000 (09:24 +0200)
wcfsetup/install/files/lib/system/event/EventHandler.class.php
wcfsetup/install/files/lib/system/request/RequestHandler.class.php
wcfsetup/install/files/lib/system/session/ACPSessionFactory.class.php
wcfsetup/install/files/lib/system/session/AbstractSessionHandler.class.php
wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index 4a645f26b30653f02891513291319a7870ca5c93..cf802104a71eb15a14e83630ed2dcd814a30010e 100644 (file)
@@ -17,37 +17,32 @@ use wcf\util\ClassUtil;
  */
 class EventHandler extends SingletonFactory {
        /**
-        * Registerd actions.
-        *
+        * registered actions
         * @var array
         */
        protected $actions = null;
        
        /**
-        * Registerd inherit actions.
-        *
+        * registered inherit actions
         * @var array
         */
        protected $inheritedActions = null;
        
        /**
-        * Instances of registerd actions.
-        *
+        * instances of registerd actions
         * @var array
         */
        protected $actionsObjects = array();
        
        /**
-        * Instances of registerd inherit actions.
-        *
+        * instances of registered inherit actions
         * @var array
         */
        protected $inheritedActionsObjects = array();
        
        /**
-        * Instances of action objects.
-        *
-        * @var array
+        * instances of listener objects
+        * @var array<wcf\system\event\IEventListener>
         */
        protected $listenerObjects = array();
        
index 0e4ff0d8438f8c56c697a494791fd0339ea76b5e..23702203b8b884a6f6d987b965d69fc9c60cf872 100644 (file)
@@ -25,6 +25,7 @@ class RequestHandler extends SingletonFactory {
         * Handles a http request
         *
         * @param       string          $application
+        * @param       boolean         $isACP
         */
        public function handle($application = 'wcf', $isACP = false) {
                // default values
index b086d36040f964c8aa6dbdfa31d37165a4ad7929..a79af9ea11473c1d65c63a39c6cb40172a810dc5 100644 (file)
@@ -15,20 +15,18 @@ use wcf\system\event\EventHandler;
 class ACPSessionFactory {
        /**
         * session editor class name
-        *
         * @var string
         */     
        protected $sessionEditor = 'wcf\data\acp\session\ACPSessionEditor';
        
        /**
         * session data editor class name
-        * 
         * @var string
         */
        protected $sessionDataEditor = 'wcf\data\acp\session\data\ACPSessionDataEditor';
        
        /**
-        * Returns the object of the active session.
+        * Loads the object of the active session.
         */     
        public function load() {
                // get session
@@ -36,12 +34,16 @@ class ACPSessionFactory {
                SessionHandler::getInstance()->load($this->sessionEditor, $this->sessionDataEditor, $sessionID);
                
                // call shouldInit event
-               if (!defined('NO_IMPORTS')) EventHandler::getInstance()->fireAction($this, 'shouldInit');
+               if (!defined('NO_IMPORTS')) {
+                       EventHandler::getInstance()->fireAction($this, 'shouldInit');
+               }
                
                $this->init();
                
                // call didInit event
-               if (!defined('NO_IMPORTS')) EventHandler::getInstance()->fireAction($this, 'didInit');
+               if (!defined('NO_IMPORTS')) {
+                       EventHandler::getInstance()->fireAction($this, 'didInit');
+               }
        }
        
        /**
@@ -59,8 +61,12 @@ class ACPSessionFactory {
         *
         */     
        protected function readSessionID() {
-               if (isset($_GET['s'])) return $_GET['s'];
-               else if (isset($_POST['s'])) return $_POST['s'];
+               if (isset($_GET['s'])) {
+                       return $_GET['s'];
+               }
+               else if (isset($_POST['s'])) {
+                       return $_POST['s'];
+               }
                
                return '';
        }
index 55ae6f490355854d59cd2eb8c1f694174ee53edb..c84633d4d350f531f200b57153080df6a78b18ed 100644 (file)
@@ -15,13 +15,12 @@ use wcf\system\SingletonFactory;
 abstract class AbstractSessionHandler extends SingletonFactory {
        /**
         * SessionHandler object
-        * 
-        * @var SessionHandler
+        * @var wcf\system\session\SessionHandler
         */
        protected $sessionHandler = null;
        
        /**
-        * Initializes session class.
+        * @see wcf\system\SingletonFactory::init()
         */     
        protected final function init() {
                $this->sessionHandler = SessionHandler::getInstance();
@@ -43,5 +42,5 @@ abstract class AbstractSessionHandler extends SingletonFactory {
        /**
         * Initializes this session.
         */
-       abstract protected function initSession();
+       protected abstract function initSession();
 }
index 92feaead7da0d649c17bbabebef79b5d296abf14..14ac15cf938f1a73f944ccf7efc5351ecfd0c5b3 100644 (file)
@@ -24,105 +24,90 @@ use wcf\util\UserUtil;
 class SessionHandler extends SingletonFactory {
        /**
         * prevents update on shutdown
-        *
         * @var boolean
         */     
        protected $doNotUpdate = false;
        
        /**
         * various environment variables
-        *
         * @var array
         */     
        protected $environment = array();
        
        /**
         * group data and permissions
-        *
         * @var array<array>
         */     
        protected $groupData = null;
        
        /**
-        * language if for active user
-        *
+        * language id for active user
         * @var integer
         */     
        protected $languageID = 0;
        
        /**
         * language ids for active user
-        *
         * @var array<integer>
         */     
        protected $languageIDs = null;
        
        /**
         * session object
-        *
-        * @var ACPSession
+        * @var wcf\data\acp\session\ACPSession
         */     
        protected $session = null;
        
        /**
         * session data object
-        * 
-        * @var ACPSessionData
+        * @var wcf\data\acp\session\data\ACPSessionData
         */
        protected $sessionData = null;
        
        /**
         * session data class name
-        * 
         * @var string
         */
        protected $sessionDataClassName = '';
        
        /**
         * session data editor class name
-        * 
         * @var string
         */
        protected $sessionDataEditorClassName = '';
        
        /**
         * session class name
-        *
         * @var string
         */     
        protected $sessionClassName = '';
        
        /**
         * session editor class name
-        * 
         * @var string
         */
        protected $sessionEditorClassName = '';
        
        /**
         * enable cookie support
-        * 
         * @var boolean
         */
        protected $useCookies = false;
        
        /**
         * user object
-        *
-        * @var User
+        * @var wcf\data\user\User
         */     
        protected $user = null;
        
        /**
         * session variables
-        * 
         * @var array
         */     
        protected $variables = null;
        
        /**
         * indicates if session variables changed and must be saved upon shutdown
-        * 
         * @var boolean
         */     
        protected $variablesChanged = false;