*/
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();
* Handles a http request
*
* @param string $application
+ * @param boolean $isACP
*/
public function handle($application = 'wcf', $isACP = false) {
// default values
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
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');
+ }
}
/**
*
*/
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 '';
}
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();
/**
* Initializes this session.
*/
- abstract protected function initSession();
+ protected abstract function initSession();
}
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;