Remove leading double underscores from form builder property names
authorMatthias Schmidt <gravatronics@live.com>
Sun, 24 Feb 2019 15:56:47 +0000 (16:56 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 24 Feb 2019 15:56:47 +0000 (16:56 +0100)
See #2509

45 files changed:
wcfsetup/install/files/lib/system/form/builder/DialogFormDocument.class.php
wcfsetup/install/files/lib/system/form/builder/FormDocument.class.php
wcfsetup/install/files/lib/system/form/builder/TFormChildNode.class.php
wcfsetup/install/files/lib/system/form/builder/TFormElement.class.php
wcfsetup/install/files/lib/system/form/builder/TFormNode.class.php
wcfsetup/install/files/lib/system/form/builder/TFormParentNode.class.php
wcfsetup/install/files/lib/system/form/builder/field/AbstractFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/AbstractNumericFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/BooleanFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/ClassNameFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/DateFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/IconFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/ItemListFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/MultilineTextFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/RadioButtonFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/SingleSelectionFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TFilterableSelectionFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TI18nFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TImmutableFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TMaximumFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TMaximumLengthFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TMinimumFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TMinimumLengthFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TNullableFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TObjectTypeFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TPackagesFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TPlaceholderFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/TSuffixedFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/WysiwygFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/acl/AclFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/acl/simple/SimpleAclFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/bbcode/BBCodeAttributesFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/dependency/AbstractFormFieldDependency.class.php
wcfsetup/install/files/lib/system/form/builder/field/dependency/ValueFormFieldDependency.class.php
wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectExcludedPackagesFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectInstructionsFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectOptionalPackagesFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/devtools/project/DevtoolsProjectRequiredPackagesFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/user/UserFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/user/UsernameFormField.class.php

index bbc657a553752e6e29b64061dd4979d59cd95013..a9db94d53bf6eb62bc27eb60d417d9cbca17aa15 100644 (file)
@@ -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;
        }
 }
index 005e2e59836f3b6c71f92d7f0608779dc10700fb..c78f2243c76961f39ae249965f8d566bc325e678 100644 (file)
@@ -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;
        }
index 83310cc3028d578c0aa478cd207f112cae383a44..4f75821f609d7b3100a9a9f1c56b262763aa40df 100644 (file)
@@ -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;
        }
index 4e1b37c7e7627b4ccc1c1e9c84585238a890fd77..eec6be8a2c6f971945579f021e1550fb058b6c9f 100644 (file)
@@ -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;
index ceae4ff1af870eae58ea33b7a6f1799417925e53..0a4872a80592db15a74c986a09268eb41cf74d8a 100644 (file)
@@ -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;
index 1e2878bcb53b8dc3f1bb4376729f914dbac08be1..96f41dd235ea6a712f0ef21743f99a5ea4cf74ec 100644 (file)
@@ -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]);
        }
        
        /**
index 1beb09803181d3b3160b50a62123f9aa138958fc..7967a1443e87535a8983a2d94a7e34740624ae15 100644 (file)
@@ -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;
        }
index d9a5cd9b23fb865423fa8e616fc82ccf232116b5..7533f5502c78995eabb38634e52e8c98e2c7ecc2 100644 (file)
@@ -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;
        }
index b2a57ce53784bc26eb5fbaa21ce135fa91e5ceb8..8e9266a54a8a4ab3d5abdfa1c68bcc13062a9e69 100644 (file)
@@ -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;
index 99418b18a6b457acc508436b269901c001c5a9c9..f98f87813c71276fda9dd9589d7d2c2cd1a478e6 100644 (file)
@@ -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]
                        );
                }
                
index eea4b6dc53533d5f2220c10f2dca6827e1f333ef..147cf711d234840f86e08c8902a05b4dde0e0b7e 100644 (file)
@@ -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;
        }
        
        /**
index bac3f80a2ec96042a5fe9721faace862447fa0ed..11b76e03b58c3186aaaab24d721b8f9294bccf7c 100644 (file)
@@ -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;
index 13c16aae50db808d2799ee496e74a599168a396a..d2d47f20c39721bcef961d62d4626d70d668041e 100644 (file)
@@ -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.");
index 7ae175f68d97ef15236a0251dad4a2d925ae143a..fea2317f2e8de050cff4c2034dc6e9b645879448 100644 (file)
@@ -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;
        }
index 8b068069cca403495e45176d2f555d6b88ab83fd..59fc1e7f32aa463cabe5e1589111424ec569cc01 100644 (file)
@@ -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 = [];
                        }
                }
                
index d8d6adb1a81ce6e280984f580ef6a0b9493a6529..77ce5eca0afb17b700d198ca0084eb53a0f7649a 100644 (file)
@@ -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;
                        }
                }
                
index 4ee0a976fec2386054db11202352d15ccf5092bf..038ce0be2af0bb364dff1c6d9de53689571292e0 100644 (file)
@@ -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
index a6069945c662cb00689fee801551411df6e4d2a5..04543c2a495bca71292c6c54f2fec18001e32ae2 100644 (file)
@@ -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;
                        }
                }
                
index 72a9a552e394144185d0af0b7232eed9913ccfdb..72c57106c2e5c85bbf6faa76651be9561db3069e 100644 (file)
@@ -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;
        }
 }
index 744b33742df554dd0bf02590456b8809f81b7717..7c4d6a2a36aaa62a3c6c3c2e6b7dfc32a0467cce 100644 (file)
@@ -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);
                        }
                }
                
index 944c60d7cadabd940c2bb2763bb31d71a0076837..587cb1bfbe8af73c830ffcd8500044fb9e408c44 100644 (file)
@@ -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;
        }
 }
index d11ced2fd4d83ae32d76514e70cab12b66cfb273..6e483c812b80f514298cf483e54872453fed9ea1 100644 (file)
@@ -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;
        }
index b0fb3547082e35c1ba6ad90c0897834a353c38ca..44ab4ec0d80545ff560d804cae38c179581466fb 100644 (file)
@@ -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;
        }
index 9ea9e167085a282d0c9bffcb2eb8a8e1e6ba032d..afa6493f573bcda535dd9bf3e59c3f4ca4531064 100644 (file)
@@ -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;
        }
index 12d564e05fa2e7b89e73a870d4246d562742b9c6..45dbc19728463e3711affcad2bb68371c2556594 100644 (file)
@@ -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;
        }
index 8a547dc760077f23b0a9c7833f119e940a5dc1e8..6af342deab9a863068b586e4c07d92c4a22c4887 100644 (file)
@@ -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;
        }
index aac8fa7ad2cabd657042465a90dd3ddfc0e05d48..66e73b8cc66f8b9e224253d2fb39ba6dc3cc1fa9 100644 (file)
@@ -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;
        }
index 568098d0d099866d23c0e903d08a76e70e426079..3ba4acf8de28a2b0bc033b0a2dadb203c90ba474 100644 (file)
@@ -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());
                }
                
index b9ec7f15f5cc9794e997ca43fed1c52e13b6e10f..dfbaa8c9cab791fb1029a1b52e1b4d92bb24e3c4 100644 (file)
@@ -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;
        }
index fe9f2436007ec33737a1d053d33f2b22d0e89fe8..90afcd04921412641ed661818a3ca4e1805a776a 100644 (file)
@@ -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;
index 58731cbde83083d7a860a9970207277537991631..064e1ce4f554904f21bf8f0a6045b70b801b7f8c 100644 (file)
@@ -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;
index b02d9ac916b7d21f7e104da612db8275a437c451..685284150cd5f2c19c7cf5b724d249d35b104bcb 100644 (file)
@@ -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;
index 5c674bb8ed1d320db5110d32e944f2442d9aafac..1d17b221045ccaba45cc5db3bb220dcc5d1e8647 100644 (file)
@@ -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);
                        }
                }
                
index 53d7b69b3e55614e5a573b2f803898beeb8a7dfd..b4f85fb1d6302e19751c1b35731b7e1890cffe47 100644 (file)
@@ -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;
        }
        
        /**
index f123ee3316e6e35166f8ef31d7d626bba3cfd52d..3d8d6c8ccd34b848c31e6e67ea3d83ad8b79545a 100644 (file)
@@ -66,7 +66,7 @@ class SimpleAclFormField extends AbstractFormField {
                        $value = $this->getDocument()->getRequestData($this->getPrefixedId());
                        
                        if (is_array($value)) {
-                               $this->__value = $value;
+                               $this->value = $value;
                        }
                }
                
index ea39df77bdd383abb7697b4dd3d6bdc92e09b540..b0e12d4c4235f5c7a5cf1ddbec6cf6edabeb554b 100644 (file)
@@ -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());
                }
        }
        
index 6db5c395e5782a5ce507fbaabb50388c579b4e48..d563b939ec134a84e02b7d86afd5ad6c6cd9788c 100644 (file)
@@ -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;
        }
index d4209027981ff4b9e682bd93be5b5c6a87a52d49..9e11172d1ea4122b9775637b29f659e5f0a54250 100644 (file)
@@ -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;
        }
index 94005750e06c16d34b5f05303ae6fc75258dfaf5..c1aa6c54a454c7325295cadf95d66f513167524e 100644 (file)
@@ -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 = [];
                }
        }
        
index bb7b910e303122e043aab75a0db71cd92d422029..b8dacf013d8014b7bfeea8f21e1de68012c33d5e 100644 (file)
@@ -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 = [];
                }
        }
        
index 93c31da8e46ed311e40a38a6dfedb5f226f946ac..379353ec0c7eb434663342724779c1d521f7aff7 100644 (file)
@@ -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 = [];
                }
        }
        
index 80b9ebb0f24cf25231e23be949050d7f96be5fe9..0a6ae95e225bd63ee6843cdf9e8457f8cd8db44d 100644 (file)
@@ -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 = [];
                }
        }
        
index 03e884d68875d604ffa64b803f99cbdf4cc83d0b..03d603161dd1b36bece7a0d3b857df6fb47f0b9a 100644 (file)
@@ -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);
                        }
                }
                
index 384a0c44f463a791735fbe9ec8095debcd93f0d9..ee3db323838be52abaa84761dc31a66748dc260a 100644 (file)
@@ -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);
                                }
                        }
                }
index b3838e25dc1c73321861f78d01f1af5955e10f46..95ca23c7123d88245db846c6fd7d9143e52353e9 100644 (file)
@@ -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;
                        }
                }