From 9299c8e5ca9c154f6fa8f7d3f20b5dc4c5a2a258 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 24 Feb 2019 16:56:47 +0100 Subject: [PATCH] Remove leading double underscores from form builder property names See #2509 --- .../form/builder/DialogFormDocument.class.php | 12 +-- .../form/builder/FormDocument.class.php | 92 +++++++++---------- .../form/builder/TFormChildNode.class.php | 10 +- .../form/builder/TFormElement.class.php | 22 ++--- .../system/form/builder/TFormNode.class.php | 54 +++++------ .../form/builder/TFormParentNode.class.php | 18 ++-- .../builder/field/AbstractFormField.class.php | 38 ++++---- .../field/AbstractNumericFormField.class.php | 24 ++--- .../builder/field/BooleanFormField.class.php | 4 +- .../field/ClassNameFormField.class.php | 28 +++--- .../builder/field/DateFormField.class.php | 24 ++--- .../builder/field/IconFormField.class.php | 2 +- .../builder/field/ItemListFormField.class.php | 10 +- .../field/MultilineTextFormField.class.php | 6 +- .../MultipleSelectionFormField.class.php | 4 +- .../field/RadioButtonFormField.class.php | 2 +- .../field/ShowOrderFormField.class.php | 10 +- .../field/SingleSelectionFormField.class.php | 2 +- .../TFilterableSelectionFormField.class.php | 6 +- .../builder/field/TI18nFormField.class.php | 26 +++--- .../field/TImmutableFormField.class.php | 8 +- .../builder/field/TMaximumFormField.class.php | 6 +- .../field/TMaximumLengthFormField.class.php | 6 +- .../builder/field/TMinimumFormField.class.php | 6 +- .../field/TMinimumLengthFormField.class.php | 6 +- .../field/TMultipleFormField.class.php | 18 ++-- .../field/TNullableFormField.class.php | 6 +- .../field/TObjectTypeFormField.class.php | 12 +-- .../field/TPackagesFormField.class.php | 6 +- .../field/TPlaceholderFormField.class.php | 8 +- .../field/TSelectionFormField.class.php | 34 +++---- .../field/TSuffixedFormField.class.php | 8 +- .../builder/field/WysiwygFormField.class.php | 14 +-- .../builder/field/acl/AclFormField.class.php | 8 +- .../acl/simple/SimpleAclFormField.class.php | 2 +- .../BBCodeAttributesFormField.class.php | 4 +- .../AbstractFormFieldDependency.class.php | 22 ++--- .../ValueFormFieldDependency.class.php | 14 +-- ...ProjectExcludedPackagesFormField.class.php | 6 +- ...oolsProjectInstructionsFormField.class.php | 6 +- ...ProjectOptionalPackagesFormField.class.php | 6 +- ...ProjectRequiredPackagesFormField.class.php | 6 +- .../builder/field/tag/TagFormField.class.php | 6 +- .../field/user/UserFormField.class.php | 4 +- .../field/user/UsernameFormField.class.php | 2 +- 45 files changed, 309 insertions(+), 309 deletions(-) diff --git a/wcfsetup/install/files/lib/system/form/builder/DialogFormDocument.class.php b/wcfsetup/install/files/lib/system/form/builder/DialogFormDocument.class.php index bbc657a553..a9db94d53b 100644 --- a/wcfsetup/install/files/lib/system/form/builder/DialogFormDocument.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/DialogFormDocument.class.php @@ -16,7 +16,7 @@ class DialogFormDocument extends FormDocument { * is `true` if dialog from can be canceled and is `false` otherwise * @var bool */ - protected $__isCancelable = true; + protected $isCancelable = true; /** * Sets whether the dialog from can be canceled and return this document. @@ -25,7 +25,7 @@ class DialogFormDocument extends FormDocument { * @return static this document */ public function cancelable($cancelable = true) { - $this->__isCancelable = $cancelable; + $this->isCancelable = $cancelable; return $this; } @@ -36,11 +36,11 @@ class DialogFormDocument extends FormDocument { public function getAction() { // do not throw exception if no action has been set as a dialog // form does not require an action to be set - if ($this->__action === null) { - $this->__action = ''; + if ($this->action === null) { + $this->action = ''; } - return $this->__action; + return $this->action; } /** @@ -63,6 +63,6 @@ class DialogFormDocument extends FormDocument { * @return bool */ public function isCancelable() { - return $this->__isCancelable; + return $this->isCancelable; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/FormDocument.class.php b/wcfsetup/install/files/lib/system/form/builder/FormDocument.class.php index 005e2e5983..c78f2243c7 100644 --- a/wcfsetup/install/files/lib/system/form/builder/FormDocument.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/FormDocument.class.php @@ -29,50 +29,50 @@ class FormDocument implements IFormDocument { * `action` property of the HTML `form` element * @var string */ - protected $__action; + protected $action; /** - * form mode (see `self::FORM_MODE_*` constants) - * @var null|string + * data handler for this document + * @var IFormDataHandler */ - protected $__formMode; + protected $dataHandler; /** - * `method` property of the HTML `form` element - * @var string + * encoding type of this form + * @var null| */ - protected $__method = 'post'; + protected $enctype = ''; /** - * global form prefix that is prepended to form elements' names and ids to - * avoid conflicts with other forms - * @var string + * is `true` if form document has already been built and is `false` otherwise + * @var bool */ - protected $__prefix; + protected $isBuilt = false; /** - * request data of the form's field - * @var null|array + * form mode (see `self::FORM_MODE_*` constants) + * @var null|string */ - protected $__requestData; + protected $formMode; /** - * data handler for this document - * @var IFormDataHandler + * `method` property of the HTML `form` element + * @var string */ - protected $dataHandler; + protected $method = 'post'; /** - * encoding type of this form - * @var null| + * global form prefix that is prepended to form elements' names and ids to + * avoid conflicts with other forms + * @var string */ - protected $enctype = ''; + protected $prefix; /** - * is `true` if form document has already been built and is `false` otherwise - * @var bool + * request data of the form's field + * @var null|array */ - protected $isBuilt = false; + protected $requestData; /** * Cleans up the form document before the form document object is destroyed. @@ -85,7 +85,7 @@ class FormDocument implements IFormDocument { * @inheritDoc */ public function action($action) { - $this->__action = $action; + $this->action = $action; return $this; } @@ -126,7 +126,7 @@ class FormDocument implements IFormDocument { * @inheritDoc */ public function formMode($formMode) { - if ($this->__formMode !== null) { + if ($this->formMode !== null) { throw new \BadMethodCallException("Form mode has already been set"); } @@ -134,7 +134,7 @@ class FormDocument implements IFormDocument { throw new \InvalidArgumentException("Unknown form mode '{$formMode}' given."); } - $this->__formMode = $formMode; + $this->formMode = $formMode; return $this; } @@ -143,11 +143,11 @@ class FormDocument implements IFormDocument { * @inheritDoc */ public function getAction() { - if ($this->__action === null) { + if ($this->action === null) { throw new \BadMethodCallException("Action has not been set."); } - return $this->__action; + return $this->action; } /** @@ -200,11 +200,11 @@ class FormDocument implements IFormDocument { * @inheritDoc */ public function getFormMode() { - if ($this->__formMode === null) { - $this->__formMode = self::FORM_MODE_CREATE; + if ($this->formMode === null) { + $this->formMode = self::FORM_MODE_CREATE; } - return $this->__formMode; + return $this->formMode; } /** @@ -222,37 +222,37 @@ class FormDocument implements IFormDocument { * @inheritDoc */ public function getMethod() { - return $this->__method; + return $this->method; } /** * @inheritDoc */ public function getPrefix() { - if ($this->__prefix === null) { + if ($this->prefix === null) { return ''; } - return $this->__prefix . '_'; + return $this->prefix . '_'; } /** * @inheritDoc */ public function getRequestData($index = null) { - if ($this->__requestData === null) { - $this->__requestData = $_POST; + if ($this->requestData === null) { + $this->requestData = $_POST; } if ($index !== null) { - if (!isset($this->__requestData[$index])) { + if (!isset($this->requestData[$index])) { throw new \InvalidArgumentException("Unknown request data with index '" . $index . "'."); } - return $this->__requestData[$index]; + return $this->requestData[$index]; } - return $this->__requestData; + return $this->requestData; } /** @@ -272,7 +272,7 @@ class FormDocument implements IFormDocument { * @inheritDoc */ public function loadValuesFromObject(IStorableObject $object) { - if ($this->__formMode === null) { + if ($this->formMode === null) { $this->formMode(self::FORM_MODE_UPDATE); } @@ -311,7 +311,7 @@ class FormDocument implements IFormDocument { throw new \InvalidArgumentException("Invalid method '{$method}' given."); } - $this->__method = $method; + $this->method = $method; return $this; } @@ -322,7 +322,7 @@ class FormDocument implements IFormDocument { public function prefix($prefix) { static::validateId($prefix); - $this->__prefix = $prefix; + $this->prefix = $prefix; return $this; } @@ -331,8 +331,8 @@ class FormDocument implements IFormDocument { * @inheritDoc */ public function readValues() { - if ($this->__requestData === null) { - $this->__requestData = $_POST; + if ($this->requestData === null) { + $this->requestData = $_POST; } return $this->defaultReadValues(); @@ -342,11 +342,11 @@ class FormDocument implements IFormDocument { * @inheritDoc */ public function requestData(array $requestData) { - if ($this->__requestData !== null) { + if ($this->requestData !== null) { throw new \BadMethodCallException('Request data has already been set.'); } - $this->__requestData = $requestData; + $this->requestData = $requestData; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/TFormChildNode.class.php b/wcfsetup/install/files/lib/system/form/builder/TFormChildNode.class.php index 83310cc302..4f75821f60 100644 --- a/wcfsetup/install/files/lib/system/form/builder/TFormChildNode.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/TFormChildNode.class.php @@ -15,7 +15,7 @@ trait TFormChildNode { * parent node of this node * @var IFormParentNode */ - protected $__parent; + protected $parent; /** * Returns the form document this node belongs to. @@ -45,11 +45,11 @@ trait TFormChildNode { * @throws \BadMethodCallException if the parent node has not been set previously */ public function getParent() { - if ($this->__parent === null) { + if ($this->parent === null) { throw new \BadMethodCallException("Before getting the parent node of '{$this->getId()}', it must be set."); } - return $this->__parent; + return $this->parent; } /** @@ -59,11 +59,11 @@ trait TFormChildNode { * @return static this node */ public function parent(IFormParentNode $parentNode) { - if ($this->__parent !== null) { + if ($this->parent !== null) { throw new \BadMethodCallException("The parent node of '{$this->getId()}' has already been set."); } - $this->__parent = $parentNode; + $this->parent = $parentNode; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/TFormElement.class.php b/wcfsetup/install/files/lib/system/form/builder/TFormElement.class.php index 4e1b37c7e7..eec6be8a2c 100644 --- a/wcfsetup/install/files/lib/system/form/builder/TFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/TFormElement.class.php @@ -18,23 +18,23 @@ trait TFormElement { * description of this element * @var string */ - protected $__description; + protected $description; /** * label of this element * @var string */ - protected $__label; + protected $label; /** * Sets the description of this element using the given language item * and returns this element. If `null` is passed, the element description * is removed. - * + * * @param null|string $languageItem language item containing the element description or `null` to unset description * @param array $variables additional variables used when resolving the language item * @return static this element - * + * * @throws \InvalidArgumentException if the given description is no or otherwise is invalid */ public function description($languageItem = null, array $variables = []) { @@ -43,14 +43,14 @@ trait TFormElement { throw new \InvalidArgumentException("Cannot use variables when unsetting description of element '{$this->getId()}'"); } - $this->__description = null; + $this->description = null; } else { if (!is_string($languageItem)) { throw new \InvalidArgumentException("Given description language item is no string, " . gettype($languageItem) . " given."); } - $this->__description = WCF::getLanguage()->getDynamicVariable($languageItem, $variables); + $this->description = WCF::getLanguage()->getDynamicVariable($languageItem, $variables); } return $this; @@ -58,11 +58,11 @@ trait TFormElement { /** * Returns the description of this element or `null` if no description has been set. - * + * * @return null|string element description */ public function getDescription() { - return $this->__description; + return $this->description; } /** @@ -71,7 +71,7 @@ trait TFormElement { * @return null|string element label */ public function getLabel() { - return $this->__label; + return $this->label; } /** @@ -91,14 +91,14 @@ trait TFormElement { throw new \InvalidArgumentException("Cannot use variables when unsetting label of element '{$this->getId()}'"); } - $this->__label = null; + $this->label = null; } else { if (!is_string($languageItem)) { throw new \InvalidArgumentException("Given description language item is no string, " . gettype($languageItem) . " given."); } - $this->__label = WCF::getLanguage()->getDynamicVariable($languageItem, $variables); + $this->label = WCF::getLanguage()->getDynamicVariable($languageItem, $variables); } return $this; diff --git a/wcfsetup/install/files/lib/system/form/builder/TFormNode.class.php b/wcfsetup/install/files/lib/system/form/builder/TFormNode.class.php index ceae4ff1af..0a4872a805 100644 --- a/wcfsetup/install/files/lib/system/form/builder/TFormNode.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/TFormNode.class.php @@ -18,25 +18,19 @@ trait TFormNode { * additional attributes of this node * @var array */ - protected $__attributes = []; + protected $attributes = []; /** * `true` if this node is available and `false` otherwise * @var bool */ - protected $__available = true; + protected $available = true; /** * CSS classes of this node * @var string[] */ - protected $__classes = []; - - /** - * id of the form node - * @var string - */ - protected $__id; + protected $classes = []; /** * dependencies of this node @@ -44,6 +38,12 @@ trait TFormNode { */ protected $dependencies = []; + /** + * id of the form node + * @var string + */ + protected $id; + /** * is `true` if node has already been populated and is `false` otherwise * @var bool @@ -67,8 +67,8 @@ trait TFormNode { public function addClass($class) { static::validateClass($class); - if (!in_array($class, $this->__classes)) { - $this->__classes[] = $class; + if (!in_array($class, $this->classes)) { + $this->classes[] = $class; } return $this; @@ -111,7 +111,7 @@ trait TFormNode { throw new \InvalidArgumentException("Value argument is of invalid type, " . gettype($value) . "."); } - $this->__attributes[$name] = $value; + $this->attributes[$name] = $value; return $this; } @@ -137,7 +137,7 @@ trait TFormNode { * @return static this node */ public function available($available = true) { - $this->__available = $available; + $this->available = $available; return $this; } @@ -202,7 +202,7 @@ trait TFormNode { throw new \InvalidArgumentException("Unknown attribute '{$name}' requested."); } - return $this->__attributes[$name]; + return $this->attributes[$name]; } /** @@ -211,7 +211,7 @@ trait TFormNode { * @return array additional node attributes */ public function getAttributes() { - return $this->__attributes; + return $this->attributes; } /** @@ -220,7 +220,7 @@ trait TFormNode { * @return string[] CSS classes of node */ public function getClasses() { - return $this->__classes; + return $this->classes; } /** @@ -259,11 +259,11 @@ trait TFormNode { * @throws \BadMethodCallException if no id has been set */ public function getId() { - if ($this->__id === null) { + if ($this->id === null) { throw new \BadMethodCallException("Id has not been set."); } - return $this->__id; + return $this->id; } /** @@ -293,7 +293,7 @@ trait TFormNode { public function hasAttribute($name) { static::validateAttribute($name); - return isset($this->__attributes[$name]); + return isset($this->attributes[$name]); } /** @@ -307,7 +307,7 @@ trait TFormNode { public function hasClass($class) { static::validateClass($class); - return array_search($class, $this->__classes) !== false; + return array_search($class, $this->classes) !== false; } /** @@ -341,11 +341,11 @@ trait TFormNode { public function id($id) { static::validateId($id); - if ($this->__id !== null) { + if ($this->id !== null) { throw new \BadMethodCallException("Id has already been set."); } - $this->__id = $id; + $this->id = $id; return $this; } @@ -360,7 +360,7 @@ trait TFormNode { * @see IFormNode::available() */ public function isAvailable() { - if ($this->__available && $this instanceof IFormParentNode) { + if ($this->available && $this instanceof IFormParentNode) { /** @var IFormChildNode $child */ foreach ($this as $child) { if ($child->isAvailable()) { @@ -371,7 +371,7 @@ trait TFormNode { return false; } - return $this->__available; + return $this->available; } /** @@ -408,7 +408,7 @@ trait TFormNode { public function removeAttribute($name) { static::validateAttribute($name); - unset($this->__attributes[$name]); + unset($this->attributes[$name]); return $this; } @@ -427,9 +427,9 @@ trait TFormNode { public function removeClass($class) { static::validateClass($class); - $index = array_search($class, $this->__classes); + $index = array_search($class, $this->classes); if ($index !== false) { - unset($this->__classes[$index]); + unset($this->classes[$index]); } return $this; diff --git a/wcfsetup/install/files/lib/system/form/builder/TFormParentNode.class.php b/wcfsetup/install/files/lib/system/form/builder/TFormParentNode.class.php index 1e2878bcb5..96f41dd235 100644 --- a/wcfsetup/install/files/lib/system/form/builder/TFormParentNode.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/TFormParentNode.class.php @@ -19,7 +19,7 @@ trait TFormParentNode { * child nodes of this node * @var IFormChildNode[] */ - protected $__children = []; + protected $children = []; /** * current iterator index @@ -38,7 +38,7 @@ trait TFormParentNode { public function appendChild(IFormChildNode $child) { $this->validateChild($child); - $this->__children[] = $child; + $this->children[] = $child; $child->parent($this); @@ -90,7 +90,7 @@ trait TFormParentNode { * @return IFormChildNode[] children of this node */ public function children() { - return $this->__children; + return $this->children; } /** @@ -115,7 +115,7 @@ trait TFormParentNode { * @return int number of children */ public function count() { - return count($this->__children); + return count($this->children); } /** @@ -124,7 +124,7 @@ trait TFormParentNode { * @return IFormChildNode current child node */ public function current() { - return $this->__children[$this->index]; + return $this->children[$this->index]; } /** @@ -133,7 +133,7 @@ trait TFormParentNode { * @return null|IFormParentNode iterator for the current child node */ public function getChildren() { - $node = $this->__children[$this->index]; + $node = $this->children[$this->index]; if ($node instanceof IFormParentNode) { return $node; } @@ -189,7 +189,7 @@ trait TFormParentNode { * @return bool */ public function hasChildren() { - return !empty($this->__children); + return !empty($this->children); } /** @@ -228,7 +228,7 @@ trait TFormParentNode { $didInsertNode = false; foreach ($this->children() as $index => $existingChild) { if ($existingChild->getId() === $referenceNodeId) { - array_splice($this->__children, $index, 0, [$child]); + array_splice($this->children, $index, 0, [$child]); $child->parent($this); @@ -295,7 +295,7 @@ trait TFormParentNode { * @return bool */ public function valid() { - return isset($this->__children[$this->index]); + return isset($this->children[$this->index]); } /** diff --git a/wcfsetup/install/files/lib/system/form/builder/field/AbstractFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/AbstractFormField.class.php index 1beb098031..7967a1443e 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/AbstractFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/AbstractFormField.class.php @@ -25,25 +25,19 @@ abstract class AbstractFormField implements IFormField { * `true` if this field is auto-focused and `false` otherwise * @var bool */ - protected $__autoFocus = false; + protected $autoFocus = false; /** * name of the object property this field represents * @var null|string */ - protected $__objectProperty; + protected $objectProperty; /** * `true` if this field has to be filled out and returns `false` otherwise * @var bool */ - protected $__required = false; - - /** - * value of the field - * @var mixed - */ - protected $__value; + protected $required = false; /** * name of the template used to output this field @@ -63,6 +57,12 @@ abstract class AbstractFormField implements IFormField { */ protected $validators = []; + /** + * value of the field + * @var mixed + */ + protected $value; + /** * @inheritDoc */ @@ -93,7 +93,7 @@ abstract class AbstractFormField implements IFormField { * @inheritDoc */ public function autoFocus($autoFocus = true) { - $this->__autoFocus = $autoFocus; + $this->autoFocus = $autoFocus; return $this; } @@ -122,8 +122,8 @@ abstract class AbstractFormField implements IFormField { * @inheritDoc */ public function getObjectProperty() { - if ($this->__objectProperty !== null) { - return $this->__objectProperty; + if ($this->objectProperty !== null) { + return $this->objectProperty; } return $this->getId(); @@ -154,7 +154,7 @@ abstract class AbstractFormField implements IFormField { * @inheritDoc */ public function getValue() { - return $this->__value; + return $this->value; } /** @@ -177,14 +177,14 @@ abstract class AbstractFormField implements IFormField { * @inheritDoc */ public function isAutoFocused() { - return $this->__autoFocus; + return $this->autoFocus; } /** * @inheritDoc */ public function isRequired() { - return $this->__required; + return $this->required; } /** @@ -204,12 +204,12 @@ abstract class AbstractFormField implements IFormField { */ public function objectProperty($objectProperty) { if ($objectProperty === '') { - $this->__objectProperty = null; + $this->objectProperty = null; } else { static::validateId($objectProperty); - $this->__objectProperty = $objectProperty; + $this->objectProperty = $objectProperty; } return $this; @@ -233,7 +233,7 @@ abstract class AbstractFormField implements IFormField { * @return static */ public function required($required = true) { - $this->__required = $required; + $this->required = $required; return $this; } @@ -242,7 +242,7 @@ abstract class AbstractFormField implements IFormField { * @inheritDoc */ public function value($value) { - $this->__value = $value; + $this->value = $value; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/AbstractNumericFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/AbstractNumericFormField.class.php index d9a5cd9b23..7533f5502c 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/AbstractNumericFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/AbstractNumericFormField.class.php @@ -19,18 +19,18 @@ abstract class AbstractNumericFormField extends AbstractFormField implements IIm use TPlaceholderFormField; use TSuffixedFormField; - /** - * step value for the input element - * @var null|number - */ - protected $__step; - /** * is `true` if only integer values are supported * @var bool */ protected $integerValues = false; + /** + * step value for the input element + * @var null|number + */ + protected $step; + /** * @inheritDoc */ @@ -76,11 +76,11 @@ abstract class AbstractNumericFormField extends AbstractFormField implements IIm * @return number|string */ public function getStep() { - if ($this->__step === null) { - $this->__step = $this->getDefaultStep(); + if ($this->step === null) { + $this->step = $this->getDefaultStep(); } - return $this->__step; + return $this->step; } /** @@ -92,10 +92,10 @@ abstract class AbstractNumericFormField extends AbstractFormField implements IIm if ($value !== '') { if ($this->integerValues) { - $this->__value = intval($value); + $this->value = intval($value); } else { - $this->__value = floatval($value); + $this->value = floatval($value); } } } @@ -128,7 +128,7 @@ abstract class AbstractNumericFormField extends AbstractFormField implements IIm } } - $this->__step = $step; + $this->step = $step; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/BooleanFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/BooleanFormField.class.php index b2a57ce537..8e9266a54a 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/BooleanFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/BooleanFormField.class.php @@ -23,7 +23,7 @@ class BooleanFormField extends AbstractFormField implements IImmutableFormField * @inheritDoc */ public function getSaveValue() { - return $this->__value ? 1 : 0; + return $this->value ? 1 : 0; } /** @@ -31,7 +31,7 @@ class BooleanFormField extends AbstractFormField implements IImmutableFormField */ public function readValue() { if ($this->getDocument()->hasRequestData($this->getPrefixedId())) { - $this->__value = $this->getDocument()->getRequestData($this->getPrefixedId()) === '1'; + $this->value = $this->getDocument()->getRequestData($this->getPrefixedId()) === '1'; } return $this; diff --git a/wcfsetup/install/files/lib/system/form/builder/field/ClassNameFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/ClassNameFormField.class.php index 99418b18a6..f98f87813c 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/ClassNameFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/ClassNameFormField.class.php @@ -23,25 +23,25 @@ class ClassNameFormField extends TextFormField { * `true` if the entered class must exist * @var bool */ - protected $__classExists = true; + protected $classExists = true; /** * name of the interface the entered class must implement * @var string */ - protected $__implementedInterface = ''; + protected $implementedInterface = ''; /** * `true` if the entered class must be instantiable * @var bool */ - protected $__instantiable = true; + protected $instantiable = true; /** * name of the class the entered class must extend * @var string */ - protected $__parentClass = ''; + protected $parentClass = ''; /** * Creates a new instance of `ClassNameFormField`. @@ -57,7 +57,7 @@ class ClassNameFormField extends TextFormField { * @return static this field */ public function classExists($classExists = true) { - $this->__classExists = $classExists; + $this->classExists = $classExists; return $this; } @@ -69,7 +69,7 @@ class ClassNameFormField extends TextFormField { * @return bool */ public function getClassExists() { - return $this->__classExists; + return $this->classExists; } /** @@ -80,7 +80,7 @@ class ClassNameFormField extends TextFormField { * @return string */ public function getImplementedInterface() { - return $this->__implementedInterface; + return $this->implementedInterface; } /** @@ -91,7 +91,7 @@ class ClassNameFormField extends TextFormField { * @return string */ public function getParentClass() { - return $this->__parentClass; + return $this->parentClass; } /** @@ -111,12 +111,12 @@ class ClassNameFormField extends TextFormField { throw new \InvalidArgumentException("Interface '{$interface}' does not exist."); } - $this->__implementedInterface = $interface; + $this->implementedInterface = $interface; if ($this->getDescription() === null) { $this->description( 'wcf.form.field.className.description.interface', - ['interface' => $this->__implementedInterface] + ['interface' => $this->implementedInterface] ); } @@ -130,7 +130,7 @@ class ClassNameFormField extends TextFormField { * @return static this field */ public function instantiable($instantiable = true) { - $this->__instantiable = $instantiable; + $this->instantiable = $instantiable; return $this; } @@ -142,7 +142,7 @@ class ClassNameFormField extends TextFormField { * @return bool */ public function isInstantiable() { - return $this->__instantiable; + return $this->instantiable; } /** @@ -158,12 +158,12 @@ class ClassNameFormField extends TextFormField { throw new \InvalidArgumentException("Class '{$parentClass}' does not exist."); } - $this->__parentClass = $parentClass; + $this->parentClass = $parentClass; if ($this->getDescription() === null) { $this->description( 'wcf.form.field.className.description.parentClass', - ['parentClass' => $this->__parentClass] + ['parentClass' => $this->parentClass] ); } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/DateFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/DateFormField.class.php index eea4b6dc53..147cf711d2 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/DateFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/DateFormField.class.php @@ -20,13 +20,13 @@ class DateFormField extends AbstractFormField implements IImmutableFormField, IN * date time format of the save value * @var string */ - protected $__saveValueFormat = null; + protected $saveValueFormat = null; /** * is `true` if not only the date, but also the time can be set * @var bool */ - protected $__supportsTime = false; + protected $supportsTime = false; /** * @inheritDoc @@ -41,11 +41,11 @@ class DateFormField extends AbstractFormField implements IImmutableFormField, IN * @return string */ public function getSaveValueFormat() { - if ($this->__saveValueFormat === null) { - $this->__saveValueFormat = 'U'; + if ($this->saveValueFormat === null) { + $this->saveValueFormat = 'U'; } - return $this->__saveValueFormat; + return $this->saveValueFormat; } /** @@ -90,10 +90,10 @@ class DateFormField extends AbstractFormField implements IImmutableFormField, IN */ public function readValue() { if ($this->getDocument()->hasRequestData($this->getPrefixedId()) && is_string($this->getDocument()->getRequestData($this->getPrefixedId()))) { - $this->__value = $this->getDocument()->getRequestData($this->getPrefixedId()); + $this->value = $this->getDocument()->getRequestData($this->getPrefixedId()); - if ($this->__value === '') { - $this->__value = null; + if ($this->value === '') { + $this->value = null; } } @@ -107,7 +107,7 @@ class DateFormField extends AbstractFormField implements IImmutableFormField, IN * @return static */ public function saveValueFormat($saveValueFormat) { - if ($this->__saveValueFormat !== null) { + if ($this->saveValueFormat !== null) { throw new \BadMethodCallException("Save value type has already been set."); } @@ -118,7 +118,7 @@ class DateFormField extends AbstractFormField implements IImmutableFormField, IN throw new \InvalidArgumentException("Invalid date time format '{$saveValueFormat}'.", 0, $e); } - $this->__saveValueFormat = $saveValueFormat; + $this->saveValueFormat = $saveValueFormat; return $this; } @@ -130,7 +130,7 @@ class DateFormField extends AbstractFormField implements IImmutableFormField, IN * @return static thsi field */ public function supportTime($supportsTime = true) { - $this->__supportsTime = $supportsTime; + $this->supportsTime = $supportsTime; return $this; } @@ -142,7 +142,7 @@ class DateFormField extends AbstractFormField implements IImmutableFormField, IN * @return bool */ public function supportsTime() { - return $this->__supportsTime; + return $this->supportsTime; } /** diff --git a/wcfsetup/install/files/lib/system/form/builder/field/IconFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/IconFormField.class.php index bac3f80a2e..11b76e03b5 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/IconFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/IconFormField.class.php @@ -57,7 +57,7 @@ class IconFormField extends AbstractFormField implements IImmutableFormField { */ public function readValue() { if ($this->getDocument()->hasRequestData($this->getPrefixedId())) { - $this->__value = $this->getDocument()->getRequestData($this->getPrefixedId()); + $this->value = $this->getDocument()->getRequestData($this->getPrefixedId()); } return $this; diff --git a/wcfsetup/install/files/lib/system/form/builder/field/ItemListFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/ItemListFormField.class.php index 13c16aae50..d2d47f20c3 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/ItemListFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/ItemListFormField.class.php @@ -128,7 +128,7 @@ class ItemListFormField extends AbstractFormField implements IImmutableFormField $value = $this->getDocument()->getRequestData($this->getPrefixedId()); if (is_array($value)) { - $this->__value = array_unique(ArrayUtil::trim($value)); + $this->value = array_unique(ArrayUtil::trim($value)); } } @@ -164,7 +164,7 @@ class ItemListFormField extends AbstractFormField implements IImmutableFormField switch ($this->getSaveValueType()) { case self::SAVE_VALUE_TYPE_ARRAY: if (is_array($value)) { - $this->__value = $value; + $this->value = $value; } else { throw new \InvalidArgumentException("Given value is no array, '" . gettype($value) . "' given."); @@ -174,7 +174,7 @@ class ItemListFormField extends AbstractFormField implements IImmutableFormField case self::SAVE_VALUE_TYPE_CSV: if (is_string($value)) { - $this->__value = explode(',', $value); + $this->value = explode(',', $value); } else { throw new \InvalidArgumentException("Given value is no string, '" . gettype($value) . "' given."); @@ -184,7 +184,7 @@ class ItemListFormField extends AbstractFormField implements IImmutableFormField case self::SAVE_VALUE_TYPE_NSV: if (is_string($value)) { - $this->__value = explode("\n", $value); + $this->value = explode("\n", $value); } else { throw new \InvalidArgumentException("Given value is no string, '" . gettype($value) . "' given."); @@ -194,7 +194,7 @@ class ItemListFormField extends AbstractFormField implements IImmutableFormField case self::SAVE_VALUE_TYPE_SSV: if (is_string($value)) { - $this->__value = explode(' ', $value); + $this->value = explode(' ', $value); } else { throw new \InvalidArgumentException("Given value is no string, '" . gettype($value) . "' given."); diff --git a/wcfsetup/install/files/lib/system/form/builder/field/MultilineTextFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/MultilineTextFormField.class.php index 7ae175f68d..fea2317f2e 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/MultilineTextFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/MultilineTextFormField.class.php @@ -15,7 +15,7 @@ class MultilineTextFormField extends TextFormField { * number of rows of the textarea * @var int */ - protected $__rows = 10; + protected $rows = 10; /** * @inheritDoc @@ -29,7 +29,7 @@ class MultilineTextFormField extends TextFormField { * @return int number of textarea rows */ public function getRows() { - return $this->__rows; + return $this->rows; } /** @@ -45,7 +45,7 @@ class MultilineTextFormField extends TextFormField { throw new \InvalidArgumentException("Given number of rows is not positive."); } - $this->__rows = $rows; + $this->rows = $rows; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php index 8b068069cc..59fc1e7f32 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php @@ -29,10 +29,10 @@ class MultipleSelectionFormField extends AbstractFormField implements IFilterabl $value = $this->getDocument()->getRequestData($this->getPrefixedId()); if (is_array($value)) { - $this->__value = $value; + $this->value = $value; } else if (!$this->isNullable()) { - $this->__value = []; + $this->value = []; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/RadioButtonFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/RadioButtonFormField.class.php index d8d6adb1a8..77ce5eca0a 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/RadioButtonFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/RadioButtonFormField.class.php @@ -28,7 +28,7 @@ class RadioButtonFormField extends AbstractFormField implements IImmutableFormFi $value = $this->getDocument()->getRequestData($this->getPrefixedId()); if (is_string($value)) { - $this->__value = $value; + $this->value = $value; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php index 4ee0a976fe..038ce0be2a 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php @@ -42,8 +42,8 @@ class ShowOrderFormField extends SingleSelectionFormField { * @inheritDoc */ public function getSaveValue() { - if ($this->__value !== null) { - $index = array_search($this->__value, array_keys($this->getOptions())); + if ($this->value !== null) { + $index = array_search($this->value, array_keys($this->getOptions())); if ($index !== false) { return $index + 1; @@ -52,7 +52,7 @@ class ShowOrderFormField extends SingleSelectionFormField { return null; } - return $this->__value; + return $this->value; } /** @@ -66,9 +66,9 @@ class ShowOrderFormField extends SingleSelectionFormField { public function options($options, $nestedOptions = false, $labelLanguageItems = true) { parent::options($options, $nestedOptions, $labelLanguageItems); - $this->__options = [0 => WCF::getLanguage()->get('wcf.form.field.showOrder.firstPosition')] + $this->__options; + $this->options = [0 => WCF::getLanguage()->get('wcf.form.field.showOrder.firstPosition')] + $this->options; if ($nestedOptions) { - array_unshift($this->__nestedOptions, [ + array_unshift($this->nestedOptions, [ 'depth' => 0, 'label' => WCF::getLanguage()->get('wcf.form.field.showOrder.firstPosition'), 'value' => 0 diff --git a/wcfsetup/install/files/lib/system/form/builder/field/SingleSelectionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/SingleSelectionFormField.class.php index a6069945c6..04543c2a49 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/SingleSelectionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/SingleSelectionFormField.class.php @@ -40,7 +40,7 @@ class SingleSelectionFormField extends AbstractFormField implements IImmutableFo $value = $this->getDocument()->getRequestData($this->getPrefixedId()); if (is_string($value)) { - $this->__value = $value; + $this->value = $value; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TFilterableSelectionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TFilterableSelectionFormField.class.php index 72a9a552e3..72c57106c2 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TFilterableSelectionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TFilterableSelectionFormField.class.php @@ -17,7 +17,7 @@ trait TFilterableSelectionFormField { * `true` if this field's options are filterable by the user * @var bool */ - protected $__filterable = false; + protected $filterable = false; /** * Sets if the selection options can be filtered by the user so that they @@ -28,7 +28,7 @@ trait TFilterableSelectionFormField { * @return static this node */ public function filterable($filterable = true) { - $this->__filterable = $filterable; + $this->filterable = $filterable; return $this; } @@ -43,6 +43,6 @@ trait TFilterableSelectionFormField { * @return bool */ public function isFilterable() { - return $this->__filterable; + return $this->filterable; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TI18nFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TI18nFormField.class.php index 744b33742d..7c4d6a2a36 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TI18nFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TI18nFormField.class.php @@ -29,19 +29,19 @@ trait TI18nFormField { * `true` if this field supports i18n input and `false` otherwise * @var bool */ - protected $__i18n = false; + protected $i18n = false; /** * `true` if this field requires i18n input and `false` otherwise * @var bool */ - protected $__i18nRequired = false; + protected $i18nRequired = false; /** * pattern for the language item used to save the i18n values * @var null|string */ - protected $__languageItemPattern; + protected $languageItemPattern; /** * Returns additional template variables used to generate the html representation @@ -74,11 +74,11 @@ trait TI18nFormField { throw new \BadMethodCallException("You can only get the language item pattern for fields with i18n enabled."); } - if ($this->__languageItemPattern === null) { + if ($this->languageItemPattern === null) { throw new \BadMethodCallException("Language item pattern has not been set."); } - return $this->__languageItemPattern; + return $this->languageItemPattern; } /** @@ -120,7 +120,7 @@ trait TI18nFormField { return ''; } - return $this->__value; + return $this->value; } /** @@ -165,7 +165,7 @@ trait TI18nFormField { * @return II18nFormField this field */ public function i18n($i18n = true) { - $this->__i18n = $i18n; + $this->i18n = $i18n; return $this; } @@ -180,7 +180,7 @@ trait TI18nFormField { * @return static this field */ public function i18nRequired($i18nRequired = true) { - $this->__i18nRequired = $i18nRequired; + $this->i18nRequired = $i18nRequired; $this->i18n(); return $this; @@ -193,7 +193,7 @@ trait TI18nFormField { * @return bool */ public function isI18n() { - return $this->__i18n; + return $this->i18n; } /** @@ -203,7 +203,7 @@ trait TI18nFormField { * @return bool */ public function isI18nRequired() { - return $this->__i18nRequired; + return $this->i18nRequired; } /** @@ -225,7 +225,7 @@ trait TI18nFormField { throw new \InvalidArgumentException("Given pattern is invalid."); } - $this->__languageItemPattern = $pattern; + $this->languageItemPattern = $pattern; return $this; } @@ -244,7 +244,7 @@ trait TI18nFormField { $this->setStringValue($value); } else { - $this->__value = $value; + $this->value = $value; } } @@ -295,7 +295,7 @@ trait TI18nFormField { $value = $this->getDocument()->getRequestData($this->getPrefixedId()); if (is_string($value)) { - $this->__value = StringUtil::trim($value); + $this->value = StringUtil::trim($value); } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TImmutableFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TImmutableFormField.class.php index 944c60d7ca..587cb1bfbe 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TImmutableFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TImmutableFormField.class.php @@ -15,8 +15,8 @@ trait TImmutableFormField { * `true` if the value of this field is immutable and `false` otherwise * @var bool */ - protected $__immutable = false; - + protected $immutable = false; + /** * Sets whether the value of this field is immutable and returns this field. * @@ -24,7 +24,7 @@ trait TImmutableFormField { * @return static this field */ public function immutable($immutable = true) { - $this->__immutable = $immutable; + $this->immutable = $immutable; return $this; } @@ -36,6 +36,6 @@ trait TImmutableFormField { * @return bool */ public function isImmutable() { - return $this->__immutable; + return $this->immutable; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TMaximumFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TMaximumFormField.class.php index d11ced2fd4..6e483c812b 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TMaximumFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TMaximumFormField.class.php @@ -15,7 +15,7 @@ trait TMaximumFormField { * maximum of the field value * @var null|number */ - protected $__maximum; + protected $maximum; /** * Returns the maximum of the values of this field or `null` if no maximum @@ -24,7 +24,7 @@ trait TMaximumFormField { * @return null|number */ public function getMaximum() { - return $this->__maximum; + return $this->maximum; } /** @@ -50,7 +50,7 @@ trait TMaximumFormField { } } - $this->__maximum = $maximum; + $this->maximum = $maximum; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TMaximumLengthFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TMaximumLengthFormField.class.php index b0fb354708..44ab4ec0d8 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TMaximumLengthFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TMaximumLengthFormField.class.php @@ -17,7 +17,7 @@ trait TMaximumLengthFormField { * maximum length of the field value * @var null|int */ - protected $__maximumLength; + protected $maximumLength; /** * Returns the maximum length of the values of this field or `null` if no placeholder @@ -26,7 +26,7 @@ trait TMaximumLengthFormField { * @return null|int */ public function getMaximumLength() { - return $this->__maximumLength; + return $this->maximumLength; } /** @@ -56,7 +56,7 @@ trait TMaximumLengthFormField { } } - $this->__maximumLength = $maximumLength; + $this->maximumLength = $maximumLength; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TMinimumFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TMinimumFormField.class.php index 9ea9e16708..afa6493f57 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TMinimumFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TMinimumFormField.class.php @@ -15,7 +15,7 @@ trait TMinimumFormField { * minimum of the field value * @var null|int */ - protected $__minimum; + protected $minimum; /** * Returns the minimum of the values of this field or `null` if no minimum @@ -24,7 +24,7 @@ trait TMinimumFormField { * @return null|number */ public function getMinimum() { - return $this->__minimum; + return $this->minimum; } /** @@ -50,7 +50,7 @@ trait TMinimumFormField { } } - $this->__minimum = $minimum; + $this->minimum = $minimum; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TMinimumLengthFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TMinimumLengthFormField.class.php index 12d564e05f..45dbc19728 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TMinimumLengthFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TMinimumLengthFormField.class.php @@ -17,7 +17,7 @@ trait TMinimumLengthFormField { * minimum length of the field value * @var null|int */ - protected $__minimumLength; + protected $minimumLength; /** * Returns the minimum length of the values of this field or `null` if no placeholder @@ -26,7 +26,7 @@ trait TMinimumLengthFormField { * @return null|int */ public function getMinimumLength() { - return $this->__minimumLength; + return $this->minimumLength; } /** @@ -56,7 +56,7 @@ trait TMinimumLengthFormField { } } - $this->__minimumLength = $minimumLength; + $this->minimumLength = $minimumLength; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php index 8a547dc760..6af342deab 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php @@ -17,19 +17,19 @@ trait TMultipleFormField { * maximum number of values that can be selected or set * @var int */ - protected $__maximumMultiples = IMultipleFormField::NO_MAXIMUM_MULTIPLES; + protected $maximumMultiples = IMultipleFormField::NO_MAXIMUM_MULTIPLES; /** * minimum number of values that can be selected or set * @var int */ - protected $__minimumMultiples = 0; + protected $minimumMultiples = 0; /** * `true` if this field allows multiple values to be selected or set and `false` otherwise * @var bool */ - protected $__multiple = false; + protected $multiple = false; /** * Returns `true` if multiple values can be selected or set and returns `false` @@ -40,7 +40,7 @@ trait TMultipleFormField { * @return bool */ public function allowsMultiple() { - return $this->__multiple; + return $this->multiple; } /** @@ -51,7 +51,7 @@ trait TMultipleFormField { * @return int maximum number of values */ public function getMaximumMultiples() { - return $this->__maximumMultiples; + return $this->maximumMultiples; } /** @@ -62,7 +62,7 @@ trait TMultipleFormField { * @return int minimum number of values */ public function getMinimumMultiples() { - return $this->__minimumMultiples; + return $this->minimumMultiples; } /** @@ -100,7 +100,7 @@ trait TMultipleFormField { } } - $this->__maximumMultiples = $maximum; + $this->maximumMultiples = $maximum; return $this; } @@ -123,7 +123,7 @@ trait TMultipleFormField { throw new \InvalidArgumentException("The given minimum number of values '{$minimum}' is greater than the set maximum number of values '{$this->getMaximumMultiples()}'."); } - $this->__minimumMultiples = $minimum; + $this->minimumMultiples = $minimum; return $this; } @@ -135,7 +135,7 @@ trait TMultipleFormField { * @return static this field */ public function multiple($multiple = true) { - $this->__multiple = $multiple; + $this->multiple = $multiple; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TNullableFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TNullableFormField.class.php index aac8fa7ad2..66e73b8cc6 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TNullableFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TNullableFormField.class.php @@ -15,7 +15,7 @@ trait TNullableFormField { * `true` if this field supports `null` as its value and `false` otherwise * @var bool */ - protected $__nullable = false; + protected $nullable = false; /** * Returns `true` if this field supports `null` as its value and returns `false` @@ -26,7 +26,7 @@ trait TNullableFormField { * @return bool */ public function isNullable() { - return $this->__nullable; + return $this->nullable; } /** @@ -36,7 +36,7 @@ trait TNullableFormField { * @return static this node */ public function nullable($nullable = true) { - $this->__nullable = $nullable; + $this->nullable = $nullable; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TObjectTypeFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TObjectTypeFormField.class.php index 568098d0d0..3ba4acf8de 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TObjectTypeFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TObjectTypeFormField.class.php @@ -18,7 +18,7 @@ trait TObjectTypeFormField { * object type * @var null|ObjectType */ - protected $__objectType; + protected $objectType; /** * Returns the object type. @@ -28,11 +28,11 @@ trait TObjectTypeFormField { * @throws \BadMethodCallException if object type has not been set */ public function getObjectType() { - if ($this->__objectType === null) { + if ($this->objectType === null) { throw new \BadMethodCallException("Object type has not been set."); } - return $this->__objectType; + return $this->objectType; } /** @@ -46,7 +46,7 @@ trait TObjectTypeFormField { * @throws InvalidObjectTypeException if given object type name is invalid */ public function objectType($objectType) { - if ($this->__objectType !== null) { + if ($this->objectType !== null) { throw new \BadMethodCallException("Object type has already been set."); } @@ -54,8 +54,8 @@ trait TObjectTypeFormField { throw new \UnexpectedValueException("Unknown definition name '{$this->getObjectTypeDefinition()}'."); } - $this->__objectType = ObjectTypeCache::getInstance()->getObjectTypeByName($this->getObjectTypeDefinition(), $objectType); - if ($this->__objectType === null) { + $this->objectType = ObjectTypeCache::getInstance()->getObjectTypeByName($this->getObjectTypeDefinition(), $objectType); + if ($this->objectType === null) { throw new InvalidObjectTypeException($objectType, $this->getObjectTypeDefinition()); } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TPackagesFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TPackagesFormField.class.php index b9ec7f15f5..dfbaa8c9ca 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TPackagesFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TPackagesFormField.class.php @@ -16,7 +16,7 @@ trait TPackagesFormField { * ids of the packages considered for this field * @var int[] */ - protected $__packageIDs = []; + protected $packageIDs = []; /** * Returns the ids of the packages considered for this field. An empty @@ -25,7 +25,7 @@ trait TPackagesFormField { * @return int[] */ public function getPackageIDs() { - return $this->__packageIDs; + return $this->packageIDs; } /** @@ -44,7 +44,7 @@ trait TPackagesFormField { } } - $this->__packageIDs = $packageIDs; + $this->packageIDs = $packageIDs; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TPlaceholderFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TPlaceholderFormField.class.php index fe9f243600..90afcd0492 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TPlaceholderFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TPlaceholderFormField.class.php @@ -16,7 +16,7 @@ trait TPlaceholderFormField { * placeholder value of this element * @var string */ - protected $__placeholder; + protected $placeholder; /** * Returns the placeholder value of this field or `null` if no placeholder has @@ -25,7 +25,7 @@ trait TPlaceholderFormField { * @return null|string */ public function getPlaceholder() { - return $this->__placeholder; + return $this->placeholder; } /** @@ -45,14 +45,14 @@ trait TPlaceholderFormField { throw new \InvalidArgumentException("Cannot use variables when unsetting placeholder of field '{$this->getId()}'"); } - $this->__placeholder = null; + $this->placeholder = null; } else { if (!is_string($languageItem)) { throw new \InvalidArgumentException("Given placeholder language item is no string, " . gettype($languageItem) . " given."); } - $this->__placeholder = WCF::getLanguage()->getDynamicVariable($languageItem, $variables); + $this->placeholder = WCF::getLanguage()->getDynamicVariable($languageItem, $variables); } return $this; diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php index 58731cbde8..064e1ce4f5 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php @@ -19,13 +19,13 @@ trait TSelectionFormField { * structured options array used to generate the form field output * @var null|array */ - protected $__nestedOptions; + protected $nestedOptions; /** * possible options to select * @var null|array */ - protected $__options; + protected $options; /** * Returns a structured array that can be used to generate the form field output. @@ -40,7 +40,7 @@ trait TSelectionFormField { throw new \BadMethodCallException("Nested options are not supported."); } - return $this->__nestedOptions; + return $this->nestedOptions; } /** @@ -51,7 +51,7 @@ trait TSelectionFormField { * @throws \BadMethodCallException if no options have been set */ public function getOptions() { - return $this->__options; + return $this->options; } /** @@ -65,7 +65,7 @@ trait TSelectionFormField { */ public function isAvailable() { // selections without any possible values are not available - return !empty($this->__options) && parent::isAvailable(); + return !empty($this->options) && parent::isAvailable(); } /** @@ -139,7 +139,7 @@ trait TSelectionFormField { $options = $dboOptions; } - $this->__options = []; + $this->options = []; if ($nestedOptions) { foreach ($options as $key => &$option) { if (!is_array($option)) { @@ -173,12 +173,12 @@ trait TSelectionFormField { if (!is_string($option['value']) && !is_numeric($option['value'])) { throw new \InvalidArgumentException("Nested option with key '{$key}' contain invalid value of type " . gettype($option['label']) . "."); } - else if (isset($this->__options[$option['value']])) { + else if (isset($this->options[$option['value']])) { throw new \InvalidArgumentException("Options values must be unique, but '{$option['value']}' appears at least twice as value."); } // save value - $this->__options[$option['value']] = $option['label']; + $this->options[$option['value']] = $option['label']; // validate depth if (!is_int($option['depth'])) { @@ -190,7 +190,7 @@ trait TSelectionFormField { } unset($option); - $this->__nestedOptions = $options; + $this->nestedOptions = $options; } else { foreach ($options as $value => $label) { @@ -205,7 +205,7 @@ trait TSelectionFormField { throw new \InvalidArgumentException("Options contain invalid label of type " . gettype($label) . "."); } - if (isset($this->__options[$value])) { + if (isset($this->options[$value])) { throw new \InvalidArgumentException("Options values must be unique, but '{$value}' appears at least twice as value."); } @@ -214,16 +214,16 @@ trait TSelectionFormField { $label = WCF::getLanguage()->getDynamicVariable($label); } - $this->__options[$value] = $label; + $this->options[$value] = $label; } - // ensure that `$this->__nestedOptions` is always populated + // ensure that `$this->nestedOptions` is always populated // for form field that support nested options if ($this->supportsNestedOptions()) { - $this->__nestedOptions = []; + $this->nestedOptions = []; - foreach ($this->__options as $value => $label) { - $this->__nestedOptions[] = [ + foreach ($this->options as $value => $label) { + $this->nestedOptions[] = [ 'depth' => 0, 'label' => $label, 'value' => $value @@ -232,8 +232,8 @@ trait TSelectionFormField { } } - if ($this->__nestedOptions === null) { - $this->__nestedOptions = []; + if ($this->nestedOptions === null) { + $this->nestedOptions = []; } return $this; diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TSuffixedFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TSuffixedFormField.class.php index b02d9ac916..685284150c 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TSuffixedFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TSuffixedFormField.class.php @@ -16,7 +16,7 @@ trait TSuffixedFormField { * suffix of this field * @var null|string */ - protected $__suffix; + protected $suffix; /** * Returns the suffix of this field or `null` if no suffix has been set. @@ -24,7 +24,7 @@ trait TSuffixedFormField { * @return null|string */ public function getSuffix() { - return $this->__suffix; + return $this->suffix; } /** @@ -43,14 +43,14 @@ trait TSuffixedFormField { throw new \InvalidArgumentException("Cannot use variables when unsetting suffix of field '{$this->getId()}'"); } - $this->__suffix = null; + $this->suffix = null; } else { if (!is_string($languageItem)) { throw new \InvalidArgumentException("Given suffix language item is no string, " . gettype($languageItem) . " given."); } - $this->__suffix = WCF::getLanguage()->getDynamicVariable($languageItem, $variables); + $this->suffix = WCF::getLanguage()->getDynamicVariable($languageItem, $variables); } return $this; diff --git a/wcfsetup/install/files/lib/system/form/builder/field/WysiwygFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/WysiwygFormField.class.php index 5c674bb8ed..1d17b22104 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/WysiwygFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/WysiwygFormField.class.php @@ -24,13 +24,13 @@ class WysiwygFormField extends AbstractFormField implements IMaximumLengthFormFi * identifier used to autosave the field value; if empty, autosave is disabled * @var string */ - protected $__autosaveId = ''; + protected $autosaveId = ''; /** * last time the field has been edited; if `0`, the last edit time is unknown * @var int */ - protected $__lastEditTime = 0; + protected $lastEditTime = 0; /** * input processor containing the wysiwyg text @@ -50,7 +50,7 @@ class WysiwygFormField extends AbstractFormField implements IMaximumLengthFormFi * @return WysiwygFormField this field */ public function autosaveId($autosaveId) { - $this->__autosaveId = $autosaveId; + $this->autosaveId = $autosaveId; return $this; } @@ -62,7 +62,7 @@ class WysiwygFormField extends AbstractFormField implements IMaximumLengthFormFi * @return string */ public function getAutosaveId() { - return $this->__autosaveId; + return $this->autosaveId; } /** @@ -79,7 +79,7 @@ class WysiwygFormField extends AbstractFormField implements IMaximumLengthFormFi * @return int */ public function getLastEditTime() { - return $this->__lastEditTime; + return $this->lastEditTime; } /** @@ -96,7 +96,7 @@ class WysiwygFormField extends AbstractFormField implements IMaximumLengthFormFi * @return WysiwygFormField this field */ public function lastEditTime($lastEditTime) { - $this->__lastEditTime = $lastEditTime; + $this->lastEditTime = $lastEditTime; return $this; } @@ -126,7 +126,7 @@ class WysiwygFormField extends AbstractFormField implements IMaximumLengthFormFi $value = $this->getDocument()->getRequestData($this->getPrefixedId()); if (is_string($value)) { - $this->__value = StringUtil::trim($value); + $this->value = StringUtil::trim($value); } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/acl/AclFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/acl/AclFormField.class.php index 53d7b69b3e..b4f85fb1d6 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/acl/AclFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/acl/AclFormField.class.php @@ -21,10 +21,10 @@ class AclFormField extends AbstractFormField implements IObjectTypeFormField { use TObjectTypeFormField; /** - * name of/filter for the name(s) of the shown acl option categories + * name of/filter for the name(s) of the shown acl option categories * @var null|string */ - protected $__categoryName; + protected $categoryName; /** * id of the edited object or `null` if no object is edited @@ -58,7 +58,7 @@ class AclFormField extends AbstractFormField implements IObjectTypeFormField { throw new \InvalidArgumentException("Invalid category name given."); } - $this->__categoryName = $categoryName; + $this->categoryName = $categoryName; return $this; } @@ -70,7 +70,7 @@ class AclFormField extends AbstractFormField implements IObjectTypeFormField { * @return null|string */ public function getCategoryName() { - return $this->__categoryName; + return $this->categoryName; } /** diff --git a/wcfsetup/install/files/lib/system/form/builder/field/acl/simple/SimpleAclFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/acl/simple/SimpleAclFormField.class.php index f123ee3316..3d8d6c8ccd 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/acl/simple/SimpleAclFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/acl/simple/SimpleAclFormField.class.php @@ -66,7 +66,7 @@ class SimpleAclFormField extends AbstractFormField { $value = $this->getDocument()->getRequestData($this->getPrefixedId()); if (is_array($value)) { - $this->__value = $value; + $this->value = $value; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/bbcode/BBCodeAttributesFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/bbcode/BBCodeAttributesFormField.class.php index ea39df77bd..b0e12d4c42 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/bbcode/BBCodeAttributesFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/bbcode/BBCodeAttributesFormField.class.php @@ -25,7 +25,7 @@ class BBCodeAttributesFormField extends AbstractFormField { /** * @inheritDoc */ - protected $__value = []; + protected $value = []; /** * @inheritDoc @@ -39,7 +39,7 @@ class BBCodeAttributesFormField extends AbstractFormField { */ public function readValue() { if ($this->getDocument()->hasRequestData($this->getPrefixedId()) && is_array($this->getDocument()->getRequestData($this->getPrefixedId()))) { - $this->__value = $this->getDocument()->getRequestData($this->getPrefixedId()); + $this->value = $this->getDocument()->getRequestData($this->getPrefixedId()); } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/dependency/AbstractFormFieldDependency.class.php b/wcfsetup/install/files/lib/system/form/builder/field/dependency/AbstractFormFieldDependency.class.php index 6db5c395e5..d563b939ec 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/dependency/AbstractFormFieldDependency.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/dependency/AbstractFormFieldDependency.class.php @@ -18,19 +18,19 @@ abstract class AbstractFormFieldDependency implements IFormFieldDependency { * node whose availability depends on the value of a field * @var IFormNode */ - protected $__dependentNode; + protected $dependentNode; /** * field the availability of the node dependents on * @var IFormField */ - protected $__field; + protected $field; /** * id of the dependency * @var string */ - protected $__id; + protected $id; /** * name of the template containing the dependency JavaScript code @@ -42,7 +42,7 @@ abstract class AbstractFormFieldDependency implements IFormFieldDependency { * @inheritDoc */ public function dependentNode(IFormNode $node) { - $this->__dependentNode = $node; + $this->dependentNode = $node; return $this; } @@ -51,7 +51,7 @@ abstract class AbstractFormFieldDependency implements IFormFieldDependency { * @inheritDoc */ public function field(IFormField $field) { - $this->__field = $field; + $this->field = $field; return $this; } @@ -60,29 +60,29 @@ abstract class AbstractFormFieldDependency implements IFormFieldDependency { * @inheritDoc */ public function getDependentNode() { - if ($this->__dependentNode === null) { + if ($this->dependentNode === null) { throw new \BadMethodCallException("Dependent node has not been set."); } - return $this->__dependentNode; + return $this->dependentNode; } /** * @inheritDoc */ public function getField() { - if ($this->__field === null) { + if ($this->field === null) { throw new \BadMethodCallException("Field has not been set."); } - return $this->__field; + return $this->field; } /** * @inheritDoc */ public function getId() { - return $this->__id; + return $this->id; } /** @@ -111,7 +111,7 @@ abstract class AbstractFormFieldDependency implements IFormFieldDependency { throw new \InvalidArgumentException("Invalid id '{$id}' given."); } - $this->__id = $id; + $this->id = $id; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/dependency/ValueFormFieldDependency.class.php b/wcfsetup/install/files/lib/system/form/builder/field/dependency/ValueFormFieldDependency.class.php index d420902798..9e11172d1e 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/dependency/ValueFormFieldDependency.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/dependency/ValueFormFieldDependency.class.php @@ -17,13 +17,13 @@ class ValueFormFieldDependency extends AbstractFormFieldDependency { * `false` * @var bool */ - protected $__isNegated = false; + protected $negate = false; /** * possible values the field may have for the dependency to be met * @var null|array */ - protected $__values; + protected $values; /** * @inheritDoc @@ -51,11 +51,11 @@ class ValueFormFieldDependency extends AbstractFormFieldDependency { * @throws \BadMethodCallException if no values have been set */ public function getValues() { - if ($this->__values === null) { + if ($this->values === null) { throw new \BadMethodCallException("Values have not been set for dependency '{$this->getId()}' on node '{$this->getDependentNode()->getId()}'."); } - return $this->__values; + return $this->values; } /** @@ -65,7 +65,7 @@ class ValueFormFieldDependency extends AbstractFormFieldDependency { * @return bool */ public function isNegated() { - return $this->__isNegated; + return $this->negate; } /** @@ -75,7 +75,7 @@ class ValueFormFieldDependency extends AbstractFormFieldDependency { * @return static $this this dependency */ public function negate($negate = true) { - $this->__isNegated = $negate; + $this->negate = $negate; return $this; } @@ -129,7 +129,7 @@ class ValueFormFieldDependency extends AbstractFormFieldDependency { } } - $this->__values = $values; + $this->values = $values; return $this; } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectExcludedPackagesFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectExcludedPackagesFormField.class.php index 94005750e0..c1aa6c54a4 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectExcludedPackagesFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectExcludedPackagesFormField.class.php @@ -24,17 +24,17 @@ class DevtoolsProjectExcludedPackagesFormField extends AbstractFormField { /** * @inheritDoc */ - protected $__value = []; + protected $value = []; /** * @inheritDoc */ public function readValue() { if ($this->getDocument()->hasRequestData($this->getPrefixedId()) && is_array($this->getDocument()->getRequestData($this->getPrefixedId()))) { - $this->__value = $this->getDocument()->getRequestData($this->getPrefixedId()); + $this->value = $this->getDocument()->getRequestData($this->getPrefixedId()); } else { - $this->__value = []; + $this->value = []; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectInstructionsFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectInstructionsFormField.class.php index bb7b910e30..b8dacf013d 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectInstructionsFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectInstructionsFormField.class.php @@ -41,7 +41,7 @@ class DevtoolsProjectInstructionsFormField extends AbstractFormField { /** * @inheritDoc */ - protected $__value = []; + protected $value = []; /** * names of package installation plugins that support the `application` @@ -110,10 +110,10 @@ class DevtoolsProjectInstructionsFormField extends AbstractFormField { */ public function readValue() { if ($this->getDocument()->hasRequestData($this->getPrefixedId()) && is_array($this->getDocument()->getRequestData($this->getPrefixedId()))) { - $this->__value = $this->getDocument()->getRequestData($this->getPrefixedId()); + $this->value = $this->getDocument()->getRequestData($this->getPrefixedId()); } else { - $this->__value = []; + $this->value = []; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectOptionalPackagesFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectOptionalPackagesFormField.class.php index 93c31da8e4..379353ec0c 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectOptionalPackagesFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectOptionalPackagesFormField.class.php @@ -24,17 +24,17 @@ class DevtoolsProjectOptionalPackagesFormField extends AbstractFormField { /** * @inheritDoc */ - protected $__value = []; + protected $value = []; /** * @inheritDoc */ public function readValue() { if ($this->getDocument()->hasRequestData($this->getPrefixedId()) && is_array($this->getDocument()->getRequestData($this->getPrefixedId()))) { - $this->__value = $this->getDocument()->getRequestData($this->getPrefixedId()); + $this->value = $this->getDocument()->getRequestData($this->getPrefixedId()); } else { - $this->__value = []; + $this->value = []; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectRequiredPackagesFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectRequiredPackagesFormField.class.php index 80b9ebb0f2..0a6ae95e22 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectRequiredPackagesFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectRequiredPackagesFormField.class.php @@ -24,17 +24,17 @@ class DevtoolsProjectRequiredPackagesFormField extends AbstractFormField { /** * @inheritDoc */ - protected $__value = []; + protected $value = []; /** * @inheritDoc */ public function readValue() { if ($this->getDocument()->hasRequestData($this->getPrefixedId()) && is_array($this->getDocument()->getRequestData($this->getPrefixedId()))) { - $this->__value = $this->getDocument()->getRequestData($this->getPrefixedId()); + $this->value = $this->getDocument()->getRequestData($this->getPrefixedId()); } else { - $this->__value = []; + $this->value = []; } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php index 03e884d688..03d603161d 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php @@ -76,9 +76,9 @@ class TagFormField extends AbstractFormField implements IObjectTypeFormField { $tags = TagEngine::getInstance()->getObjectTags($this->getObjectType()->objectType, $objectID, $languageIDs); - $this->__value = []; + $this->value = []; foreach ($tags as $tag) { - $this->__value[] = $tag->name; + $this->value[] = $tag->name; } return $this; @@ -109,7 +109,7 @@ class TagFormField extends AbstractFormField implements IObjectTypeFormField { $value = $this->getDocument()->getRequestData($this->getPrefixedId()); if (is_array($value)) { - $this->__value = ArrayUtil::trim($value); + $this->value = ArrayUtil::trim($value); } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/user/UserFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/user/UserFormField.class.php index 384a0c44f4..ee3db32383 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/user/UserFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/user/UserFormField.class.php @@ -40,10 +40,10 @@ class UserFormField extends AbstractFormField implements IImmutableFormField, IM if (is_string($value)) { if ($this->allowsMultiple()) { - $this->__value = ArrayUtil::trim(explode(',', $value)); + $this->value = ArrayUtil::trim(explode(',', $value)); } else { - $this->__value = StringUtil::trim($value); + $this->value = StringUtil::trim($value); } } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/user/UsernameFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/user/UsernameFormField.class.php index b3838e25dc..95ca23c712 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/user/UsernameFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/user/UsernameFormField.class.php @@ -69,7 +69,7 @@ class UsernameFormField extends AbstractFormField implements IImmutableFormField $value = $this->getDocument()->getRequestData($this->getPrefixedId()); if (is_string($value)) { - $this->__value = $value; + $this->value = $value; } } -- 2.20.1