| Index: trunk/extensions/Validator/includes/ParameterInput.php |
| — | — | @@ -49,7 +49,7 @@ |
| 50 | 50 | protected $inputName; |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | | - * COnstructor. |
| | 53 | + * Constructor. |
| 54 | 54 | * |
| 55 | 55 | * @since 0.4.6 |
| 56 | 56 | * |
| — | — | @@ -63,6 +63,17 @@ |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
| | 67 | + * Sets the current value. |
| | 68 | + * |
| | 69 | + * @since 0.4.6 |
| | 70 | + * |
| | 71 | + * @param mixed $currentValue |
| | 72 | + */ |
| | 73 | + public function setCurrentValue( $currentValue ) { |
| | 74 | + $this->currentValue = $currentValue; |
| | 75 | + } |
| | 76 | + |
| | 77 | + /** |
| 67 | 78 | * Sets the name for the input; defaults to the name of the parameter. |
| 68 | 79 | * |
| 69 | 80 | * @since 0.6.4 |
| — | — | @@ -70,7 +81,7 @@ |
| 71 | 82 | * @param string $name |
| 72 | 83 | */ |
| 73 | 84 | public function setInputName( $name ) { |
| 74 | | - $this->inputName = name; |
| | 85 | + $this->inputName = $name; |
| 75 | 86 | } |
| 76 | 87 | |
| 77 | 88 | /** |
| — | — | @@ -96,7 +107,7 @@ |
| 97 | 108 | } |
| 98 | 109 | else { |
| 99 | 110 | switch ( $this->param->getType() ) { |
| 100 | | - case Paramater::TYPE_CHAR: |
| | 111 | + case Parameter::TYPE_CHAR: |
| 101 | 112 | case Parameter::TYPE_FLOAT: |
| 102 | 113 | case Parameter::TYPE_INTEGER: |
| 103 | 114 | case Parameter::TYPE_NUMBER: |
| — | — | @@ -104,9 +115,9 @@ |
| 105 | 116 | break; |
| 106 | 117 | case Parameter::TYPE_BOOLEAN: |
| 107 | 118 | $html = $this->getBooleanInput(); |
| 108 | | - case Paramater::TYPE_STRING: |
| | 119 | + case Parameter::TYPE_STRING: |
| 109 | 120 | default: |
| 110 | | - $html = $this->getIntInput(); |
| | 121 | + $html = $this->getStrInput(); |
| 111 | 122 | break; |
| 112 | 123 | } |
| 113 | 124 | } |