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

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

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

        if ($key->count() === 0) {
            return $value;
        }

        // #TODO Handle other objects and arrays
        if (! $value instanceof Accessable) {
            throw new AccessException('Could not get the value for the key "' . $key->raw . '".');
        }

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

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

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

        if ($key->count() === 0) {
            return $value;
        }

        // #TODO Handle other objects and arrays
        if (! $value instanceof Accessable) {
            throw new AccessException('Could not get the value for the key "' . $key->raw . '".');
        }

        return $value->get($key);
    }
public function get ( $ key ) { $ key = $ this -> parseKey ( $ key ) ; $ string = $ key -> shift ( ) ; $ key -> next ( ) ; $ value = $ this -> getValue ( $ string ) ; if ( $ key -> count ( ) === 0 ) { return $ value ; } // #TODO Handle other objects and arrays if ( ! $ value instanceof Accessable ) { throw new AccessException ( 'Could not get the value for the key "' . $ key -> raw . '".' ) ; } return $ value -> get ( $ key ) ; }
Get a value by a key

@param mixed $key The key

@return mixed
Get a value by a key