You are here

public function AbstractOptions::__unset in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-stdlib/src/AbstractOptions.php \Zend\Stdlib\AbstractOptions::__unset()

Set a configuration property to NULL

Parameters

string $key:

Return value

void

Throws

Exception\InvalidArgumentException

Overrides ParameterObjectInterface::__unset

See also

ParameterObject::__unset()

File

vendor/zendframework/zend-stdlib/src/AbstractOptions.php, line 163

Class

AbstractOptions

Namespace

Zend\Stdlib

Code

public function __unset($key) {
  try {
    $this
      ->__set($key, null);
  } catch (Exception\BadMethodCallException $e) {
    throw new Exception\InvalidArgumentException('The class property $' . $key . ' cannot be unset as' . ' NULL is an invalid value for it', 0, $e);
  }
}