src/PeekAndPoke/Component/Formal/Accessor/AccessorChain.php
protected function applyChainForGet($key, $subject)
    {
        foreach ($this->accessors as $accessor) {
            if ($accessor->canAccessForRead($key, $subject)) {
                return $accessor->get($key, $subject);
            }
        }

        throw new \InvalidArgumentException(
            'Don\'t know how to get "' . $key . '" in "' .
            (is_object($subject) ? get_class($subject) : gettype($subject)) . '"'
        );
    }
protected function applyChainForGet($key, $subject)
    {
        foreach ($this->accessors as $accessor) {
            if ($accessor->canAccessForRead($key, $subject)) {
                return $accessor->get($key, $subject);
            }
        }

        throw new \InvalidArgumentException(
            'Don\'t know how to get "' . $key . '" in "' .
            (is_object($subject) ? get_class($subject) : gettype($subject)) . '"'
        );
    }
@param string $key
@param mixed  $subject

@return mixed