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 AccessInterface) {
throw new AccessException('Could not get the value for the key "' . $key->raw . '".');
}
return $value->get($key);
}