*/
interface IStorableObject {
/**
- * Returns the value of a object data variable with the given name.
+ * Returns the value of a object data variable with the given name or `null` if no
+ * such data variable exists.
*
* @param string $name
* @return mixed
/**
* Searches a specific object by object id and setting internal iterator
- * pointer to found item. Returns null if object id is not found.
+ * pointer to found item. Returns `null` if object id is not found.
*
* @param integer $objectID
- * @return \wcf\data\DatabaseObject
+ * @return DatabaseObject|null
*/
public function search($objectID);
}
}
/**
- * Returns the language of this article content as language object.
+ * Returns the language of this article content or `null` if no language has been specified.
*
- * @return Language|null
+ * @return Language|null
*/
public function getLanguage() {
if ($this->languageID) {
}
/**
- * Returns a certain article content.
+ * Returns a certain article content or `null` if it does not exist.
*
* @param integer $articleID
* @param integer $languageID
}
/**
- * Returns the BBCode with the given tag or null if no such BBCode exists.
+ * Returns the BBCode with the given tag or `null` if no such BBCode exists.
*
* @param string $tag
- * @return \wcf\data\bbcode\BBCode
+ * @return BBCode|null
*/
public function getBBCodeByTag($tag) {
if (isset($this->cachedBBCodes[$tag])) {
}
/**
- * Returns the image of this box.
+ * Returns the image of this box or `null` if the box has no image.
*
- * @return ViewableMedia
+ * @return ViewableMedia|null
*/
public function getImage() {
if ($this->boxType === 'menu') {
protected $image;
/**
- * Returns a certain box content.
+ * Returns a certain box content or `null` if it does not exist.
*
* @param integer $boxID
* @param integer $languageID
}
/**
- * Returns the decorated category with the given id or null if no such
+ * Returns the decorated category with the given id or `null` if no such
* category exists.
*
* @param integer $categoryID
- * @return AbstractDecoratedCategory
+ * @return AbstractDecoratedCategory|null
*/
public static function getCategory($categoryID) {
$category = CategoryHandler::getInstance()->getCategory($categoryID);
public function sendNotification(Like $like);
/**
- * Returns the language id of this object or its parent.
+ * Returns the language id of this object or its parent or `null` if no explicit language is set.
*
- * @return integer
+ * @return integer|null
*/
public function getLanguageID();
}
}
/**
- * Returns the acl option category with the given object type id and name.
+ * Returns the acl option category with the given object type id and name
+ * or `null` if no such category exists.
*
* @param integer $objectTypeID
* @param string $categoryName
- * @return \wcf\data\acl\option\category\ACLOptionCategory
+ * @return ACLOptionCategory|null
*/
public function getCategory($objectTypeID, $categoryName) {
if (isset($this->categories[$objectTypeID][$categoryName])) {
/**
* Returns an application based upon it's abbreviation. Will return the
- * primary application if $abbreviation equals to 'wcf'
+ * primary application if the abbreviation is `wcf` or `null` if no such
+ * application exists.
*
* @param string $abbreviation package abbreviation, e.g. `wbb` for `com.woltlab.wbb`
- * @return Application
+ * @return Application|null
*/
public function getApplication($abbreviation) {
if (isset($this->cache['abbreviation'][$abbreviation])) {
}
/**
- * Returns an application by package id.
+ * Returns an application delivered by the package with the given id or `null`
+ * if no such application exists.
*
- * @param integer $packageID package id
- * @return Application application object
+ * @param integer $packageID package id
+ * @return Application|null application object
* @since 3.0
*/
public function getApplicationByID($packageID) {
}
/**
- * Returns abbreviation for a given package id or null if application is unknown.
+ * Returns abbreviation for a given package id or `null` if application is unknown.
*
* @param integer $packageID unique package id
- * @return string
+ * @return string|null
*/
public function getAbbreviation($packageID) {
foreach ($this->cache['abbreviation'] as $abbreviation => $applicationID) {
<?php
namespace wcf\system\attachment;
use wcf\data\attachment\Attachment;
+use wcf\data\IUserContent;
/**
* Any attachment object type should implement this interface.
public function getMaxCount();
/**
- * Returns the container object of an attachment.
+ * Returns the container object of an attachment or `null` if the container object does not exist.
*
* @param integer $objectID
- * @return \wcf\data\IUserContent
+ * @return IUserContent|null
*/
public function getObject($objectID);
}
/**
- * Returns the box with the given id or null.
+ * Returns the box with the given id or `null` if it does not exist.
*
* @param integer $boxID
* @return Box|null
}
/**
- * Returns the box with given identifier.
+ * Returns the box with given identifier or `null` if there is no such box.
*
* @param string $identifier
* @return Box|null
<?php
namespace wcf\system\box;
use wcf\data\box\Box;
+use wcf\data\media\ViewableMedia;
/**
* Default interface for box controllers.
public function hasContent();
/**
- * Returns the image of this box.
+ * Returns the image of this box or `null` if the box has no image.
*
* Note: The box itself checks if the active user can access the returned media file.
*
- * @return \wcf\data\media\ViewableMedia
+ * @return ViewableMedia|null
*/
public function getImage();
}
/**
- * Returns the captcha object type with the given id or null if no such
+ * Returns the captcha object type with the given id or `null` if no such
* object type exists.
*
* @param integer $objectTypeID
}
/**
- * Returns the category object with the given category id.
+ * Returns the category with the given id or `null` if no such category ecists.
*
* @param integer $categoryID
- * @return \wcf\data\category\Category
+ * @return Category|null
*/
public function getCategory($categoryID) {
if (isset($this->categories[$categoryID])) {
}
/**
- * Returns the category object type with the given id or null if no such object type exists.
+ * Returns the category object type with the given id or `null` if no such object type exists.
*
* @param integer $objectTypeID
* @return ObjectType|null
}
/**
- * Returns the category object type with the given name or null if no such object type exists.
+ * Returns the category object type with the given name or `null` if no such object type exists.
*
* @param string $objectType
* @return ObjectType|null
/**
* Returns the name of the object type of the definition with the given
- * name for categories of this type. If categories of this type are no
- * object of the relevant type, null is returned.
+ * name for categories of this type or `null` if no such object type exists.
*
* @param string $definitionName
- * @return string
+ * @return string|null
*/
public function getObjectTypeName($definitionName);
<?php
namespace wcf\system\clipboard;
+use wcf\data\object\type\ObjectType;
use wcf\data\object\type\ObjectTypeCache;
use wcf\data\DatabaseObject;
use wcf\data\DatabaseObjectList;
}
/**
- * Returns a type id by name.
+ * Returns the id of the clipboard object type with the given name or `null` if no such
+ * clipboard object type exists.
*
* @param string $typeName
- * @return integer
+ * @return integer|null
*/
public function getObjectTypeID($typeName) {
if (isset($this->cache['objectTypeNames'][$typeName])) {
}
/**
- * Returns a type by object type id.
+ * Returns the clipboard object type with the given id or `null` if no such
+ * clipboard object type exists.
*
- * @param integer $objectTypeID
- * @return \wcf\data\object\type\ObjectType
+ * @param integer $objectTypeID
+ * @return ObjectType|null
*/
public function getObjectType($objectTypeID) {
if (isset($this->cache['objectTypes'][$objectTypeID])) {
}
/**
- * Returns object type by object type name.
+ * Returns the id of the clipboard object type with the given name or `null` if no such
+ * clipboard object type exists.
+ *
+ * TODO: The name of this method does not reflect its return type and appears not to be used.
*
* @param string $objectType
- * @return integer
+ * @return integer|null
*/
public function getObjectTypeByName($objectType) {
foreach ($this->cache['objectTypes'] as $objectTypeID => $objectTypeObj) {
}
/**
- * Returns items for clipboard editor.
+ * Returns the data of the items for clipboard editor or `null` if no items are marked.
*
* @param string|string[] $page
* @param integer $pageObjectID
- * @return mixed[][]
+ * @return array|null
* @throws SystemException
*/
public function getEditorItems($page, $pageObjectID) {
namespace wcf\system\clipboard\action;
use wcf\data\clipboard\action\ClipboardAction;
use wcf\data\DatabaseObject;
+use wcf\system\clipboard\ClipboardEditorItem;
/**
* Basic interface for all clipboard editor actions.
public function getTypeName();
/**
- * Returns editor item for the clipboard action with the given name or null
+ * Returns the editor item for the clipboard action with the given name or `null`
* if the action is not applicable to the given objects.
*
- * @param DatabaseObject[] $objects
- * @param \wcf\data\clipboard\action\ClipboardAction $action
- * @return \wcf\system\clipboard\ClipboardEditorItem
+ * @param DatabaseObject[] $objects
+ * @param ClipboardAction $action
+ * @return ClipboardEditorItem|null
*/
public function execute(array $objects, ClipboardAction $action);
}
/**
- * Returns the object type id for a given object type.
+ * Returns the id of the comment object type with the given name or `null` if no
+ * such object type exists.
*
* @param string $objectType
- * @return integer
+ * @return integer|null
*/
public function getObjectTypeID($objectType) {
if (isset($this->cache['objectTypeIDs'][$objectType])) {
}
/**
- * Returns the object type for a given object type id.
+ * Returns the comment object type with the given name or `null` if no such
+ * object type exists.
*
* @param integer $objectTypeID
- * @return ObjectType
+ * @return ObjectType|null
*/
public function getObjectType($objectTypeID) {
if (isset($this->cache['objectTypes'][$objectTypeID])) {
}
/**
- * Returns the maximum value the property can have or null if there is no
+ * Returns the maximum value the property can have or `null` if there is no
* such maximum.
*
- * @return integer
+ * @return integer|null
*/
protected function getMaxValue() {
if ($this->getDecoratedObject()->maxvalue !== null) {
}
/**
- * Returns the minimum value the property can have or null if there is no
+ * Returns the minimum value the property can have or `null` if there is no
* such minimum.
*
- * @return integer
+ * @return integer|null
*/
protected function getMinValue() {
if ($this->getDecoratedObject()->minvalue !== null) {
public function checkUser(User $user, Option $option, $value);
/**
- * Returns the data of the condition or null if the option should be ignored.
+ * Returns the data of the condition or `null` if the option should be ignored.
*
* @param Option $option
* @param mixed $newValue
protected function validateImport(array $data) { }
/**
- * Find an existing item for updating, should return sql query.
+ * Returns an array with a sql query and its parameters to find an existing item for updating
+ * or `null` if updates are not supported.
*
- * @param array $data
- * @return array
+ * @param array $data
+ * @return array|null
*/
abstract protected function findExistingItem(array $data);
public function uninstall();
/**
- * Returns the default file name containing the instructions. If no default
- * file name is supported, null is returned.
+ * Returns the default file name containing the instructions or `null` if no default
+ * file name is supported.
*
* @return string
* @since 3.0
* Validates if the passed instruction is valid for this package installation plugin. If anything is
* wrong with it, this method should return false.
*
- * @param \wcf\system\package\PackageArchive $packageArchive
- * @param string $instruction
+ * @param PackageArchive $packageArchive
+ * @param string $instruction
* @return boolean
*/
public static function isValid(PackageArchive $packageArchive, $instruction);
}
/**
- * Returns the class data for the active request or null if for the given
- * configuration no proper class exist.
+ * Returns the class data for the active request or `null` if no proper class exists
+ * for the given configuration.
*
* @param string $application application identifier
* @param string $controller controller name
* @param boolean $isAcpRequest true if this is an ACP request
* @param string $pageType page type, e.g. 'form' or 'action'
- * @return string[] className, controller and pageType
+ * @return string[]|null className, controller and pageType
*/
protected function getClassData($application, $controller, $isAcpRequest, $pageType) {
$className = $application . '\\' . ($isAcpRequest ? 'acp\\' : '') . $pageType . '\\' . $controller . ucfirst($pageType);
* @inheritDoc
*/
public function getObject($objectID) {
- if (isset($this->messageCache[$objectID])) return $this->messageCache[$objectID];
+ if (isset($this->messageCache[$objectID])) {
+ return $this->messageCache[$objectID];
+ }
+
return null;
}
public function getApplication();
/**
- * Returns the search conditions of this message type.
+ * Returns the search conditions of this message type or `null` if no special search conditions are necessary.
*
* @param IForm $form
- * @return PreparedStatementConditionBuilder
+ * @return PreparedStatementConditionBuilder|null
*/
public function getConditions(IForm $form = null);
/**
* Returns an unique instance of the authentication class
*
- * @return \wcf\system\user\authentication\IUserAuthentication
+ * @return IUserAuthentication
*/
public static function getInstance();
/**
* Stores the user access data for a persistent login.
*
- * @param \wcf\data\user\User $user
- * @param string $username
- * @param string $password
+ * @param User $user
+ * @param string $username
+ * @param string $password
*/
public function storeAccessData(User $user, $username, $password);
/**
- * Does a manual user login.
+ * Does a manual user login or `null` if login was unsuccessful.
*
* @param string $username
* @param string $password
* @param string $userClassname class name of user class
- * @return \wcf\data\user\User
+ * @return User|null
*/
public function loginManually($username, $password, $userClassname = User::class);
/**
- * Does a user login automatically.
+ * Does a user login automatically or `null` if login was unsuccessful.
*
* @param boolean $persistent true = persistent login
* @param string $userClassname class name of user class
- * @return \wcf\data\user\User
+ * @return User|null
*/
public function loginAutomatically($persistent = false, $userClassname = User::class);
}