| @@ 254-261 (lines=8) @@ | ||
| 251 | * |
|
| 252 | * @see BindingState::ENABLED |
|
| 253 | */ |
|
| 254 | public function isEnabled() |
|
| 255 | { |
|
| 256 | if (null === $this->state) { |
|
| 257 | throw new NotLoadedException('The binding descriptor is not loaded.'); |
|
| 258 | } |
|
| 259 | ||
| 260 | return BindingState::ENABLED === $this->state; |
|
| 261 | } |
|
| 262 | ||
| 263 | /** |
|
| 264 | * Returns whether the binding is disabled. |
|
| @@ 275-282 (lines=8) @@ | ||
| 272 | * |
|
| 273 | * @see BindingState::DISABLED |
|
| 274 | */ |
|
| 275 | public function isDisabled() |
|
| 276 | { |
|
| 277 | if (null === $this->state) { |
|
| 278 | throw new NotLoadedException('The binding descriptor is not loaded.'); |
|
| 279 | } |
|
| 280 | ||
| 281 | return BindingState::DISABLED === $this->state; |
|
| 282 | } |
|
| 283 | ||
| 284 | /** |
|
| 285 | * Returns whether the type of the binding does not exist. |
|
| @@ 296-303 (lines=8) @@ | ||
| 293 | * |
|
| 294 | * @see BindingState::TYPE_NOT_FOUND |
|
| 295 | */ |
|
| 296 | public function isTypeNotFound() |
|
| 297 | { |
|
| 298 | if (null === $this->state) { |
|
| 299 | throw new NotLoadedException('The binding descriptor is not loaded.'); |
|
| 300 | } |
|
| 301 | ||
| 302 | return BindingState::TYPE_NOT_FOUND === $this->state; |
|
| 303 | } |
|
| 304 | ||
| 305 | /** |
|
| 306 | * Returns whether the type of the binding is not enabled. |
|
| @@ 317-324 (lines=8) @@ | ||
| 314 | * |
|
| 315 | * @see BindingState::TYPE_NOT_ENABLED |
|
| 316 | */ |
|
| 317 | public function isTypeNotEnabled() |
|
| 318 | { |
|
| 319 | if (null === $this->state) { |
|
| 320 | throw new NotLoadedException('The binding descriptor is not loaded.'); |
|
| 321 | } |
|
| 322 | ||
| 323 | return BindingState::TYPE_NOT_ENABLED === $this->state; |
|
| 324 | } |
|
| 325 | ||
| 326 | /** |
|
| 327 | * Returns whether the binding is invalid. |
|
| @@ 338-345 (lines=8) @@ | ||
| 335 | * |
|
| 336 | * @see BindingState::INVALID |
|
| 337 | */ |
|
| 338 | public function isInvalid() |
|
| 339 | { |
|
| 340 | if (null === $this->state) { |
|
| 341 | throw new NotLoadedException('The binding descriptor is not loaded.'); |
|
| 342 | } |
|
| 343 | ||
| 344 | return BindingState::INVALID === $this->state; |
|
| 345 | } |
|
| 346 | ||
| 347 | private function refreshState() |
|
| 348 | { |
|