src/Helper/AccessableTrait.php
public function has($key)
    {
        $key = $this->parseKey($key);

        $string = $key->shift();
        $key->next();

        if ($key->count() === 0) {
            return array_key_exists($string, $this->data);
        }

        if (! array_key_exists($string, $this->data)) {
            return false;
        }

        $value = $this->getValue($string);

        // #TODO Handle other objects and arrays
        if (! $value instanceof Accessable) {
            //throw new AccessException('The existance for the key "' . $key->raw . '" could\'nt be checked.');
            return false;
        }

        return $value->has($key);
    }
public function has($key)
    {
        $key = $this->parseKey($key);

        $string = $key->shift();
        $key->next();

        if ($key->count() === 0) {
            return array_key_exists($string, $this->data);
        }

        if (! array_key_exists($string, $this->data)) {
            return false;
        }

        $value = $this->getValue($string);

        // #TODO Handle other objects and arrays
        if (! $value instanceof Accessable) {
            //throw new AccessException('The existance for the key "' . $key->raw . '" could\'nt be checked.');
            return false;
        }

        return $value->has($key);
    }
public function has ( $ key ) { $ key = $ this -> parseKey ( $ key ) ; $ string = $ key -> shift ( ) ; $ key -> next ( ) ; if ( $ key -> count ( ) === 0 ) { return array_key_exists ( $ string , $ this -> data ) ; } if ( ! array_key_exists ( $ string , $ this -> data ) ) { return false ; } $ value = $ this -> getValue ( $ string ) ; // #TODO Handle other objects and arrays if ( ! $ value instanceof Accessable ) { //throw new AccessException('The existance for the key "' . $key->raw . '" could\'nt be checked.'); return false ; } return $ value -> has ( $ key ) ; }
Check if a value exists

@param mixed $key The key

@return bool
Check if a value exists