From: Matthias Schmidt Date: Wed, 3 Aug 2011 15:08:12 +0000 (+0200) Subject: Updated documentation of several system classes. X-Git-Tag: 2.0.0_Beta_1~1919^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b0eae87f918c8257a30739a0253fd66fd58be05f;p=GitHub%2FWoltLab%2FWCF.git Updated documentation of several system classes. --- diff --git a/wcfsetup/install/files/lib/system/application/AbstractApplication.class.php b/wcfsetup/install/files/lib/system/application/AbstractApplication.class.php index c08bc3d319..39ab8510fd 100644 --- a/wcfsetup/install/files/lib/system/application/AbstractApplication.class.php +++ b/wcfsetup/install/files/lib/system/application/AbstractApplication.class.php @@ -10,7 +10,7 @@ use wcf\system\WCF; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system + * @subpackage system.application * @category Community Framework */ abstract class AbstractApplication implements IApplication { diff --git a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php index bee0313cf9..82c452aa89 100644 --- a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php +++ b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php @@ -16,7 +16,6 @@ use wcf\system\SingletonFactory; class ApplicationHandler extends SingletonFactory { /** * application cache - * * @var array */ protected $cache = null; diff --git a/wcfsetup/install/files/lib/system/application/IApplication.class.php b/wcfsetup/install/files/lib/system/application/IApplication.class.php index 5ad2f3a207..74f4d3537c 100644 --- a/wcfsetup/install/files/lib/system/application/IApplication.class.php +++ b/wcfsetup/install/files/lib/system/application/IApplication.class.php @@ -8,7 +8,7 @@ namespace wcf\system\application; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system + * @subpackage system.application * @category Community Framework */ interface IApplication { diff --git a/wcfsetup/install/files/lib/system/auth/UserAuth.class.php b/wcfsetup/install/files/lib/system/auth/UserAuth.class.php index fcede6b246..a4ad24f7b4 100644 --- a/wcfsetup/install/files/lib/system/auth/UserAuth.class.php +++ b/wcfsetup/install/files/lib/system/auth/UserAuth.class.php @@ -16,8 +16,7 @@ use wcf\system\event\EventHandler; abstract class UserAuth { /** * active instance - * - * @var UserAuth + * @var wcf\system\auth\UserAuth */ protected static $instance = null; diff --git a/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumb.class.php b/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumb.class.php index c0bcea4e2c..96180792dd 100644 --- a/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumb.class.php +++ b/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumb.class.php @@ -15,14 +15,12 @@ use wcf\util\StringUtil; class Breadcrumb { /** * displayed label - * * @var string */ protected $label = ''; /** * target url - * * @var string */ protected $url = ''; diff --git a/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumbs.class.php b/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumbs.class.php index 6ddc672168..74b64e5b36 100644 --- a/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumbs.class.php +++ b/wcfsetup/install/files/lib/system/breadcrumb/Breadcrumbs.class.php @@ -15,15 +15,14 @@ use wcf\system\SingletonFactory; class Breadcrumbs extends SingletonFactory { /** * list of breadcrumbs - * - * @var array + * @var array */ protected $items = array(); /** - * Adds a breadcrumb (insert order is crucial!) + * Adds a breadcrumb (insertion order is crucial!). * - * @param Breadcrumb $item + * @param wcf\system\breadcrumb\Breadcrumb $item */ public function add(Breadcrumb $item) { $this->items[] = $item; @@ -32,7 +31,7 @@ class Breadcrumbs extends SingletonFactory { /** * Returns the list of breadcrumbs. * - * @return array + * @return array */ public function get() { return $this->items; @@ -41,8 +40,8 @@ class Breadcrumbs extends SingletonFactory { /** * Replaces a breadcrumb, returns true if replacement was successful. * - * @param Breadcrumb $item - * @param integer $index + * @param wcf\system\breadcrumb\Breadcrumb $item + * @param integer $index * @return boolean */ public function replace(Breadcrumb $item, $index) { @@ -58,7 +57,7 @@ class Breadcrumbs extends SingletonFactory { /** * Removes a breadcrumb, returns true if deletion was successful. * - * @param integer $index + * @param integer $index * @return boolean */ public function remove($index) { diff --git a/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php b/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php index e9235979e5..b3505de410 100644 --- a/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php +++ b/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php @@ -16,15 +16,13 @@ use wcf\util\StringUtil; */ class CacheHandler extends SingletonFactory { /** - * Registered cache resources. - * + * registered cache resources * @var array */ protected $cacheResources = array(); /** * cache source object - * * @var wcf\system\cache\source\ICacheSource */ protected $cacheSource = null; @@ -157,7 +155,7 @@ class CacheHandler extends SingletonFactory { /** * Returns the cache source object. * - * @return CacheSource + * @return wcf\system\cache\source\ICacheSource */ public function getCacheSource() { return $this->cacheSource; diff --git a/wcfsetup/install/files/lib/system/form/FormDocument.class.php b/wcfsetup/install/files/lib/system/form/FormDocument.class.php index 1758680922..160365941e 100644 --- a/wcfsetup/install/files/lib/system/form/FormDocument.class.php +++ b/wcfsetup/install/files/lib/system/form/FormDocument.class.php @@ -15,14 +15,12 @@ use wcf\util\StringUtil; class FormDocument { /** * list of FormElementContainer objects - * * @var array */ protected $containers = array(); /** * form document name - * * @var string */ protected $name = ''; diff --git a/wcfsetup/install/files/lib/system/form/container/AbstractFormElementContainer.class.php b/wcfsetup/install/files/lib/system/form/container/AbstractFormElementContainer.class.php index e4cdcec0e5..5b9af14b4f 100644 --- a/wcfsetup/install/files/lib/system/form/container/AbstractFormElementContainer.class.php +++ b/wcfsetup/install/files/lib/system/form/container/AbstractFormElementContainer.class.php @@ -12,27 +12,24 @@ use wcf\util\StringUtil; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.container * @category Community Framework */ abstract class AbstractFormElementContainer implements IFormElementContainer { /** - * list of FormElement objects - * + * list of IFormElement objects * @var array */ protected $children = array(); /** * element description or help text - * * @var string */ protected $description = ''; /** * element label - * * @var string */ protected $label = ''; diff --git a/wcfsetup/install/files/lib/system/form/container/MultipleSelectionFormElementContainer.class.php b/wcfsetup/install/files/lib/system/form/container/MultipleSelectionFormElementContainer.class.php index ac65a13766..425d550bdf 100644 --- a/wcfsetup/install/files/lib/system/form/container/MultipleSelectionFormElementContainer.class.php +++ b/wcfsetup/install/files/lib/system/form/container/MultipleSelectionFormElementContainer.class.php @@ -8,13 +8,12 @@ namespace wcf\system\form\container; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.container * @category Community Framework */ class MultipleSelectionFormElementContainer extends SelectionFormElementContainer { /** * container value - * * @var array */ protected $value = array(); diff --git a/wcfsetup/install/files/lib/system/form/container/SelectionFormElementContainer.class.php b/wcfsetup/install/files/lib/system/form/container/SelectionFormElementContainer.class.php index 0eecc8cd25..1380ab033d 100644 --- a/wcfsetup/install/files/lib/system/form/container/SelectionFormElementContainer.class.php +++ b/wcfsetup/install/files/lib/system/form/container/SelectionFormElementContainer.class.php @@ -8,13 +8,12 @@ namespace wcf\system\form\container; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.container * @category Community Framework */ abstract class SelectionFormElementContainer extends AbstractFormElementContainer { /** * container name - * * @var string */ protected $name = ''; diff --git a/wcfsetup/install/files/lib/system/form/container/SingleSelectionFormElementContainer.class.php b/wcfsetup/install/files/lib/system/form/container/SingleSelectionFormElementContainer.class.php index 5961c1622b..99ffc0bdc8 100644 --- a/wcfsetup/install/files/lib/system/form/container/SingleSelectionFormElementContainer.class.php +++ b/wcfsetup/install/files/lib/system/form/container/SingleSelectionFormElementContainer.class.php @@ -8,13 +8,12 @@ namespace wcf\system\form\container; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.container * @category Community Framework */ class SingleSelectionFormElementContainer extends SelectionFormElementContainer { /** * container value - * * @var string */ protected $value = ''; diff --git a/wcfsetup/install/files/lib/system/form/element/AbstractFormElement.class.php b/wcfsetup/install/files/lib/system/form/element/AbstractFormElement.class.php index 3035f58961..7aa0066147 100644 --- a/wcfsetup/install/files/lib/system/form/element/AbstractFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/element/AbstractFormElement.class.php @@ -11,27 +11,24 @@ use wcf\util\StringUtil; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.element * @category Community Framework */ abstract class AbstractFormElement implements IFormElement { /** * element description or help text - * * @var string */ protected $description = ''; /** * element label - * * @var string */ protected $label = ''; /** * FormElementContainer object - * * @var wcf\system\form\IFormElementContainer */ protected $parent = null; diff --git a/wcfsetup/install/files/lib/system/form/element/AbstractNamedFormElement.class.php b/wcfsetup/install/files/lib/system/form/element/AbstractNamedFormElement.class.php index db80e015ad..4559bf02a5 100644 --- a/wcfsetup/install/files/lib/system/form/element/AbstractNamedFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/element/AbstractNamedFormElement.class.php @@ -9,20 +9,18 @@ use wcf\util\StringUtil; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.element * @category Community Framework */ abstract class AbstractNamedFormElement extends AbstractFormElement { /** * element name - * * @var string */ protected $name = ''; /** * element value - * * @var string */ protected $value = ''; diff --git a/wcfsetup/install/files/lib/system/form/element/LabelFormElement.class.php b/wcfsetup/install/files/lib/system/form/element/LabelFormElement.class.php index 30a16c2dc1..802dfa185b 100644 --- a/wcfsetup/install/files/lib/system/form/element/LabelFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/element/LabelFormElement.class.php @@ -9,13 +9,12 @@ use wcf\system\util\StringUtil; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.element * @category Community Framework */ class LabelFormElement extends AbstractFormElement { /** * element text - * * @var string */ protected $text = ''; diff --git a/wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php b/wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php index 3dfbc6d540..65311695d7 100644 --- a/wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php @@ -8,7 +8,7 @@ namespace wcf\system\form\element; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.element * @category Community Framework */ class MultipleSelectionFormElement extends AbstractNamedFormElement { diff --git a/wcfsetup/install/files/lib/system/form/element/PasswordInputFormElement.class.php b/wcfsetup/install/files/lib/system/form/element/PasswordInputFormElement.class.php index 8b8589d700..e1e36395f7 100644 --- a/wcfsetup/install/files/lib/system/form/element/PasswordInputFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/element/PasswordInputFormElement.class.php @@ -9,7 +9,7 @@ use wcf\util\StringUtil; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.element * @category Community Framework */ class PasswordInputFormElement extends AbstractNamedFormElement { diff --git a/wcfsetup/install/files/lib/system/form/element/SingleSelectionFormElement.class.php b/wcfsetup/install/files/lib/system/form/element/SingleSelectionFormElement.class.php index e3a6c81160..d1fd6d9d55 100644 --- a/wcfsetup/install/files/lib/system/form/element/SingleSelectionFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/element/SingleSelectionFormElement.class.php @@ -8,7 +8,7 @@ namespace wcf\system\form\element; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.element * @category Community Framework */ class SingleSelectionFormElement extends AbstractNamedFormElement { diff --git a/wcfsetup/install/files/lib/system/form/element/TextInputFormElement.class.php b/wcfsetup/install/files/lib/system/form/element/TextInputFormElement.class.php index 7a41b9b8b2..01e0bdd25a 100644 --- a/wcfsetup/install/files/lib/system/form/element/TextInputFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/element/TextInputFormElement.class.php @@ -9,7 +9,7 @@ use wcf\util\StringUtil; * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf - * @subpackage system.form + * @subpackage system.form.element * @category Community Framework */ class TextInputFormElement extends AbstractNamedFormElement { diff --git a/wcfsetup/install/files/lib/system/image/adapter/ImageAdapter.class.php b/wcfsetup/install/files/lib/system/image/adapter/ImageAdapter.class.php index 626d0a785d..eac4360e41 100644 --- a/wcfsetup/install/files/lib/system/image/adapter/ImageAdapter.class.php +++ b/wcfsetup/install/files/lib/system/image/adapter/ImageAdapter.class.php @@ -15,7 +15,6 @@ use wcf\system\session\SystemException; class ImageAdapter implements IImageAdapter { /** * IImageAdapter object - * * @var IImageAdapter */ protected $adapter = null; diff --git a/wcfsetup/install/files/lib/system/image/adapter/ImagickImageAdapter.class.php b/wcfsetup/install/files/lib/system/image/adapter/ImagickImageAdapter.class.php index 99efd8c141..9db0a8dc31 100644 --- a/wcfsetup/install/files/lib/system/image/adapter/ImagickImageAdapter.class.php +++ b/wcfsetup/install/files/lib/system/image/adapter/ImagickImageAdapter.class.php @@ -15,14 +15,12 @@ use wcf\system\exception\SystemException; class ImagickImageAdapter implements IImageAdapter { /** * active color - * * @var \ImagickPixel */ protected $color = null; /** * Imagick object - * * @var \Imagick */ protected $imagick = null; diff --git a/wcfsetup/install/files/lib/system/io/Tar.class.php b/wcfsetup/install/files/lib/system/io/Tar.class.php index 42f48059c9..d1611a7804 100644 --- a/wcfsetup/install/files/lib/system/io/Tar.class.php +++ b/wcfsetup/install/files/lib/system/io/Tar.class.php @@ -22,12 +22,46 @@ use wcf\util\FileUtil; * @category Community Framework */ class Tar { + /** + * name of the archive + * @var string + */ protected $archiveName = ''; + + /** + * content of the tar file + * @var array + */ protected $contentList = array(); + + /** + * indicates if tar file is opened + * @var boolean + */ protected $opened = false; + + /** + * indicates if file content has been read + * @var boolean + */ protected $read = false; + + /** + * file object + * @var wcf\system\io\File + */ protected $file = null; + + /** + * indicates if the tar file is (g)zipped + * @var boolean + */ protected $isZipped = false; + + /** + * file access mode + * @var string + */ protected $mode = 'rb'; /** diff --git a/wcfsetup/install/files/lib/system/io/TarWriter.class.php b/wcfsetup/install/files/lib/system/io/TarWriter.class.php index df6ac2e4c1..0dd0061c49 100644 --- a/wcfsetup/install/files/lib/system/io/TarWriter.class.php +++ b/wcfsetup/install/files/lib/system/io/TarWriter.class.php @@ -20,6 +20,9 @@ use wcf\util\FileUtil; * @category Community Framework */ class TarWriter extends Tar { + /** + * @see wcf\system\io\Tar::$mode + */ protected $mode = 'wb+'; /** diff --git a/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php b/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php index b84b0ccd91..f426954fa7 100644 --- a/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php +++ b/wcfsetup/install/files/lib/system/language/LanguageFactory.class.php @@ -18,31 +18,28 @@ use wcf\util\StringUtil; */ abstract class LanguageFactory { /** - * Language cache. - * + * Language cache * @var array */ private static $cache = null; /** - * Initialized languages. - * - * @var array + * Initialized languages + * @var array */ private static $languages = array(); /** * Active template scripting compiler - * - * @var TemplateScriptingCompiler + * @var wcf\system\template\TemplateScriptingCompiler */ private static $scriptingCompiler = null; /** - * Returns a Language-object for each requested language id. + * Returns a Language-object for the requested language id. * * @param integer $languageID - * @return Language + * @return wcf\data\language\Language */ public static function getLanguage($languageID) { if (self::$cache === null) self::loadCache(); @@ -91,7 +88,7 @@ abstract class LanguageFactory { /** * Returns a list of available language categories. * - * @return array + * @return array */ public static function getCategories() { $categories = array(); @@ -171,7 +168,7 @@ abstract class LanguageFactory { * Returns an instance of Language or NULL for a given language code. * * @param string $languageCode - * @return Language + * @return wcf\data\language\Language */ public static function getLanguageByCode($languageCode) { if (self::$cache === null) self::loadCache(); @@ -196,7 +193,7 @@ abstract class LanguageFactory { /** * Returns the active scripting compiler object. * - * @return TemplateScriptingCompiler + * @return wcf\system\template\TemplateScriptingCompiler */ public static function getScriptingCompiler() { if (self::$scriptingCompiler === null) { @@ -237,10 +234,8 @@ abstract class LanguageFactory { * @param integer $languageID */ private static function setLocale($languageID) { - // set locale for - // string comparison - // character classification and conversion - // date and time formatting + // set locale for string comparison, character classification and + // conversion and date and time formatting setlocale(LC_COLLATE, self::$languages[$languageID]->get('wcf.global.locale.unix').'.UTF-8', self::$languages[$languageID]->get('wcf.global.locale.unix'), self::$languages[$languageID]->get('wcf.global.locale.win')); setlocale(LC_CTYPE, self::$languages[$languageID]->get('wcf.global.locale.unix').'.UTF-8', self::$languages[$languageID]->get('wcf.global.locale.unix'), self::$languages[$languageID]->get('wcf.global.locale.win')); } @@ -280,6 +275,7 @@ abstract class LanguageFactory { } } } + return $availableLanguages; } @@ -308,9 +304,10 @@ abstract class LanguageFactory { } /** - * Returns an ordered list of all installed languages. + * Returns an ordered list with the names all installed languages in the + * active language. * - * @return array + * @return array */ public static function getLanguages() { $languages = array(); @@ -319,22 +316,21 @@ abstract class LanguageFactory { } StringUtil::sort($languages); - return $languages; } /** - * Returns a sorted list of all installed language codes. + * Returns an ordered list of all installed language codes. * - * @return array + * @return array */ public static function getLanguageCodes() { - $languages = array(); + $languageCodes = array(); foreach (self::$cache['codes'] as $languageCode => $languageID) { - $languages[$languageID] = $languageCode; + $languageCodes[$languageID] = $languageCode; } - StringUtil::sort($languages); - return $languages; + StringUtil::sort($languageCodes); + return $languageCodes; } }