* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
- * @subpackage system
+ * @subpackage system.application
* @category Community Framework
*/
abstract class AbstractApplication implements IApplication {
class ApplicationHandler extends SingletonFactory {
/**
* application cache
- *
* @var array<array>
*/
protected $cache = null;
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
- * @subpackage system
+ * @subpackage system.application
* @category Community Framework
*/
interface IApplication {
abstract class UserAuth {
/**
* active instance
- *
- * @var UserAuth
+ * @var wcf\system\auth\UserAuth
*/
protected static $instance = null;
class Breadcrumb {
/**
* displayed label
- *
* @var string
*/
protected $label = '';
/**
* target url
- *
* @var string
*/
protected $url = '';
class Breadcrumbs extends SingletonFactory {
/**
* list of breadcrumbs
- *
- * @var array<Breadcrumb>
+ * @var array<wcf\system\breadcrumb\Breadcrumb>
*/
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;
/**
* Returns the list of breadcrumbs.
*
- * @return array<Breadcrumb>
+ * @return array<wcf\system\breadcrumb\Breadcrumb>
*/
public function get() {
return $this->items;
/**
* 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) {
/**
* Removes a breadcrumb, returns true if deletion was successful.
*
- * @param integer $index
+ * @param integer $index
* @return boolean
*/
public function remove($index) {
*/
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;
/**
* Returns the cache source object.
*
- * @return CacheSource
+ * @return wcf\system\cache\source\ICacheSource
*/
public function getCacheSource() {
return $this->cacheSource;
class FormDocument {
/**
* list of FormElementContainer objects
- *
* @var array<wcf\system\form\IFormElementContainer>
*/
protected $containers = array();
/**
* form document name
- *
* @var string
*/
protected $name = '';
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @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<wcf\system\form\IFormElement>
*/
protected $children = array();
/**
* element description or help text
- *
* @var string
*/
protected $description = '';
/**
* element label
- *
* @var string
*/
protected $label = '';
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @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();
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @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 = '';
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
- * @subpackage system.form
+ * @subpackage system.form.container
* @category Community Framework
*/
class SingleSelectionFormElementContainer extends SelectionFormElementContainer {
/**
* container value
- *
* @var string
*/
protected $value = '';
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @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;
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @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 = '';
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
- * @subpackage system.form
+ * @subpackage system.form.element
* @category Community Framework
*/
class LabelFormElement extends AbstractFormElement {
/**
* element text
- *
* @var string
*/
protected $text = '';
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
- * @subpackage system.form
+ * @subpackage system.form.element
* @category Community Framework
*/
class MultipleSelectionFormElement extends AbstractNamedFormElement {
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
- * @subpackage system.form
+ * @subpackage system.form.element
* @category Community Framework
*/
class PasswordInputFormElement extends AbstractNamedFormElement {
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
- * @subpackage system.form
+ * @subpackage system.form.element
* @category Community Framework
*/
class SingleSelectionFormElement extends AbstractNamedFormElement {
* @copyright 2001-2011 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
- * @subpackage system.form
+ * @subpackage system.form.element
* @category Community Framework
*/
class TextInputFormElement extends AbstractNamedFormElement {
class ImageAdapter implements IImageAdapter {
/**
* IImageAdapter object
- *
* @var IImageAdapter
*/
protected $adapter = null;
class ImagickImageAdapter implements IImageAdapter {
/**
* active color
- *
* @var \ImagickPixel
*/
protected $color = null;
/**
* Imagick object
- *
* @var \Imagick
*/
protected $imagick = null;
* @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';
/**
* @category Community Framework
*/
class TarWriter extends Tar {
+ /**
+ * @see wcf\system\io\Tar::$mode
+ */
protected $mode = 'wb+';
/**
*/
abstract class LanguageFactory {
/**
- * Language cache.
- *
+ * Language cache
* @var array<array>
*/
private static $cache = null;
/**
- * Initialized languages.
- *
- * @var array<Language>
+ * Initialized languages
+ * @var array<wcf\data\language\Language>
*/
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();
/**
* Returns a list of available language categories.
*
- * @return array
+ * @return array<string>
*/
public static function getCategories() {
$categories = array();
* 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();
/**
* Returns the active scripting compiler object.
*
- * @return TemplateScriptingCompiler
+ * @return wcf\system\template\TemplateScriptingCompiler
*/
public static function getScriptingCompiler() {
if (self::$scriptingCompiler === null) {
* @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'));
}
}
}
}
+
return $availableLanguages;
}
}
/**
- * 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<string>
*/
public static function getLanguages() {
$languages = array();
}
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<string>
*/
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;
}
}