public function __isset($key)
    {
        if ($this->flag == self::ARRAY_AS_PROPS) {
            return $this->offsetExists($key);
        }

        if (in_array($key, $this->protectedProperties)) {
            throw new \InvalidArgumentException('$key is a protected property, use a different key');
        }

        return isset($this->$key);
    }
public function __isset($key)
    {
        if ($this->flag == self::ARRAY_AS_PROPS) {
            return $this->offsetExists($key);
        }

        if (in_array($key, $this->protectedProperties)) {
            throw new \InvalidArgumentException('$key is a protected property, use a different key');
        }

        return isset($this->$key);
    }
public function __isset ( $ key ) { if ( $ this -> flag == self :: ARRAY_AS_PROPS ) { return $ this -> offsetExists ( $ key ) ; } if ( in_array ( $ key , $ this -> protectedProperties ) ) { throw new \ InvalidArgumentException ( '$key is a protected property, use a different key' ) ; } return isset ( $ this -> $ key ) ; }
Returns whether the requested key exists

@param  mixed $key

@throws \InvalidArgumentException
@return boolean
Returns whether the requested key exists