| @@ 147-154 (lines=8) @@ | ||
| 144 | * |
|
| 145 | * @return mixed |
|
| 146 | */ |
|
| 147 | public function extractValue($name, $value) |
|
| 148 | { |
|
| 149 | if ($this->hasStrategy($name)) { |
|
| 150 | $strategy = $this->getStrategy($name); |
|
| 151 | $value = $strategy->extract($value); |
|
| 152 | } |
|
| 153 | return $value; |
|
| 154 | } |
|
| 155 | ||
| 156 | /** |
|
| 157 | * Converts a value for hydration. If no strategy exists the plain value is returned. |
|
| @@ 164-171 (lines=8) @@ | ||
| 161 | * |
|
| 162 | * @return mixed |
|
| 163 | */ |
|
| 164 | public function hydrateValue($name, $value) |
|
| 165 | { |
|
| 166 | if ($this->hasStrategy($name)) { |
|
| 167 | $strategy = $this->getStrategy($name); |
|
| 168 | $value = $strategy->hydrate($value); |
|
| 169 | } |
|
| 170 | return $value; |
|
| 171 | } |
|
| 172 | } |
|
| 173 | ||