classIsImmutable() public static method

Thrown when a mutable method is invoked on an immutable object.
public static classIsImmutable ( string $class ) : self
$class string Class name
return self
Exemplo n.º 1
0
 /**
  * Not supported.
  *
  * @see http://php.net/arrayaccess.offsetunset
  * @throws BadMethodCallException
  */
 public function offsetUnset($key)
 {
     throw BadMethodCallException::classIsImmutable(__CLASS__);
 }