From acfe7efb774d63c94be8c42379f0a03695f73b66 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 16 Aug 2011 09:24:21 +0200 Subject: [PATCH] Updated some documentations --- .../lib/system/event/EventHandler.class.php | 17 +++++--------- .../system/request/RequestHandler.class.php | 1 + .../session/ACPSessionFactory.class.php | 20 ++++++++++------ .../session/AbstractSessionHandler.class.php | 7 +++--- .../system/session/SessionHandler.class.php | 23 ++++--------------- 5 files changed, 27 insertions(+), 41 deletions(-) diff --git a/wcfsetup/install/files/lib/system/event/EventHandler.class.php b/wcfsetup/install/files/lib/system/event/EventHandler.class.php index 4a645f26b3..cf802104a7 100644 --- a/wcfsetup/install/files/lib/system/event/EventHandler.class.php +++ b/wcfsetup/install/files/lib/system/event/EventHandler.class.php @@ -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 */ protected $listenerObjects = array(); diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index 0e4ff0d843..23702203b8 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/system/session/ACPSessionFactory.class.php b/wcfsetup/install/files/lib/system/session/ACPSessionFactory.class.php index b086d36040..a79af9ea11 100644 --- a/wcfsetup/install/files/lib/system/session/ACPSessionFactory.class.php +++ b/wcfsetup/install/files/lib/system/session/ACPSessionFactory.class.php @@ -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 ''; } diff --git a/wcfsetup/install/files/lib/system/session/AbstractSessionHandler.class.php b/wcfsetup/install/files/lib/system/session/AbstractSessionHandler.class.php index 55ae6f4903..c84633d4d3 100644 --- a/wcfsetup/install/files/lib/system/session/AbstractSessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/AbstractSessionHandler.class.php @@ -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(); } diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index 92feaead7d..14ac15cf93 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -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 */ 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 */ 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; -- 2.20.1