Phalcon\Db\Adapter\MongoDB\Exception\BadMethodCallException::classIsImmutable PHP 메소드

classIsImmutable() 공개 정적인 메소드

Thrown when a mutable method is invoked on an immutable object.
public static classIsImmutable ( string $class ) : self
$class string Class name
리턴 self
    public static function classIsImmutable($class)
    {
        return new static(sprintf('%s is immutable', $class));
    }

Usage Example

예제 #1
0
 /**
  * Not supported.
  *
  * @see http://php.net/arrayaccess.offsetunset
  * @throws BadMethodCallException
  */
 public function offsetUnset($key)
 {
     throw BadMethodCallException::classIsImmutable(__CLASS__);
 }