*/
class ACPSession extends DatabaseObject {
/**
- * @see \wcf\data\DatabaseObject::$databaseTableName
+ * @inheritDoc
*/
protected static $databaseTableName = 'acp_session';
/**
- * @see \wcf\data\DatabaseObject::$databaseTableIndexIsIdentity
+ * @inheritDoc
*/
protected static $databaseTableIndexIsIdentity = false;
/**
- * @see \wcf\data\DatabaseObject::$databaseTableIndexName
+ * @inheritDoc
*/
protected static $databaseTableIndexName = 'sessionID';
* is no such session.
*
* @param integer $userID
- * @return \wcf\data\session\Session
+ * @return ACPSession
*/
public static function getSessionByUserID($userID) {
$sql = "SELECT *
FROM ".static::getDatabaseTableName()."
WHERE userID = ?";
$statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute(array($userID));
- $row = $statement->fetchArray();
+ $statement->execute([$userID]);
- if ($row === false) {
- return null;
- }
-
- return new static(null, $row);
+ return $statement->fetchObject(static::class);
}
}
*/
class ACPSessionAction extends AbstractDatabaseObjectAction {
/**
- * @see \wcf\data\AbstractDatabaseObjectAction::$className
+ * @inheritDoc
*/
- protected $className = 'wcf\data\acp\session\ACPSessionEditor';
+ protected $className = ACPSessionEditor::class;
}
*/
class ACPSessionEditor extends DatabaseObjectEditor {
/**
- * @see \wcf\data\DatabaseObjectDecorator::$baseClass
+ * @inheritDoc
*/
- protected static $baseClass = 'wcf\data\acp\session\ACPSession';
+ protected static $baseClass = ACPSession::class;
/**
- * @see \wcf\data\DatabaseObjectEditor::create()
+ * @inheritDoc
*/
public static function create(array $parameters = array()) {
if (isset($parameters['userID']) && !$parameters['userID']) {
$sql = "DELETE FROM ".call_user_func(array(static::$baseClass, 'getDatabaseTableName'))."
WHERE lastActivityTime < ?";
$statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute(array($timestamp));
+ $statement->execute([$timestamp]);
}
}
*/
class ACPSessionList extends DatabaseObjectList {
/**
- * @see \wcf\data\DatabaseObjectList::$className
+ * @inheritDoc
*/
- public $className = 'wcf\data\acp\session\ACPSession';
+ public $className = ACPSession::class;
}
* @package com.woltlab.wcf
* @subpackage data.acp.session.virtual
* @category Community Framework
+ *
+ * @property-read integer $virtualSessionID
+ * @property-read string $sessionID
+ * @property-read string $ipAddress
+ * @property-read string $userAgent
+ * @property-read integer $lastActivityTime
+ * @property-read string $sessionVariables
*/
class ACPSessionVirtual extends DatabaseObject {
/**
- * @see \wcf\data\DatabaseObject::$databaseTableName
+ * @inheritDoc
*/
protected static $databaseTableName = 'acp_session_virtual';
/**
- * @see \wcf\data\DatabaseObject::$databaseTableIndexName
+ * @inheritDoc
*/
protected static $databaseTableIndexName = 'virtualSessionID';
* Returns the active virtual session object or null.
*
* @param string $sessionID
- * @return \wcf\data\session\virtual\SessionVirtual
+ * @return ACPSessionVirtual
*/
public static function getExistingSession($sessionID) {
$sql = "SELECT *
WHERE sessionID = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array($sessionID));
- $row = $statement->fetchArray();
- return $row['count'];
+ return $statement->fetchColumn();
}
}
*/
class ACPSessionVirtualAction extends AbstractDatabaseObjectAction {
/**
- * @see \wcf\data\AbstractDatabaseObjectAction::$className
+ * @inheritDoc
*/
protected $className = ACPSessionVirtualEditor::class;
* @subpackage data.session
* @category Community Framework
*
- * @property-read string $sessionVariables
* @property-read string $spiderID
*/
class Session extends ACPSession {
* @package com.woltlab.wcf
* @subpackage data.session.virtual
* @category Community Framework
- *
- * @property-read integer $virtualSessionID
- * @property-read string $sessionID
- * @property-read string $ipAddress
- * @property-read string $userAgent
- * @property-read integer $lastActivityTime
*/
class SessionVirtual extends ACPSessionVirtual {
/**