public function offsetExists($key)
    {
        if (is_numeric($key)) {
            throw new InvalidArgumentException(
                'Entity array access only supports non-numeric keys'
            );
        }

        if ($this->separator && strstr($key, $this->separator)) {
            return $this->hasWithSeparator($key);
        }

        $key = $this->camelize($key);

        /** @internal Edge Case: "_" → "" */
        if ($key === '') {
            return false;
        }

        if (is_callable([ $this, $key ])) {
            $value = $this->{$key}();
        } else {
            if (!isset($this->{$key})) {
                return $this->hasInDelegates($key);
            }
            $value = $this->{$key};
        }

        return ($value !== null);
    }
public function offsetExists($key)
    {
        if (is_numeric($key)) {
            throw new InvalidArgumentException(
                'Entity array access only supports non-numeric keys'
            );
        }

        if ($this->separator && strstr($key, $this->separator)) {
            return $this->hasWithSeparator($key);
        }

        $key = $this->camelize($key);

        /** @internal Edge Case: "_" → "" */
        if ($key === '') {
            return false;
        }

        if (is_callable([ $this, $key ])) {
            $value = $this->{$key}();
        } else {
            if (!isset($this->{$key})) {
                return $this->hasInDelegates($key);
            }
            $value = $this->{$key};
        }

        return ($value !== null);
    }
public function offsetExists ( $ key ) { if ( is_numeric ( $ key ) ) { throw new InvalidArgumentException ( 'Entity array access only supports non-numeric keys' ) ; } if ( $ this -> separator && strstr ( $ key , $ this -> separator ) ) { return $ this -> hasWithSeparator ( $ key ) ; } $ key = $ this -> camelize ( $ key ) ; /** @internal Edge Case: "_" → "" */ if ( $ key === '' ) { return false ; } if ( is_callable ( [ $ this , $ key ] ) ) { $ value = $ this -> { $ key } ( ) ; } else { if ( ! isset ( $ this -> { $ key } ) ) { return $ this -> hasInDelegates ( $ key ) ; } $ value = $ this -> { $ key } ; } return ( $ value !== null ) ; }
Determines if this store contains the specified key and if its value is not NULL.

Routine:
- If the data key is {@see SeparatorAwareTrait::$separator nested},
the data-tree is traversed until the endpoint is found, if any;
- If the data key does NOT exist on the store, a lookup is performed
on each delegate store until a key is found, if any.

@see    \ArrayAccess
@uses   SeparatorAwareTrait::hasWithSeparator()
@uses   DelegatesAwareTrait::hasInDelegates()
@param  string $key The data key to check.
@throws InvalidArgumentException If the $key is not a string or is a numeric value.
@return boolean TRUE if $key exists and has a value other than NULL, FALSE otherwise.
Determines if this store contains the specified key and if its value is not NULL .