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

        $type    = (is_object($subject) ? get_class($subject) : gettype($subject));
        $message = 'Don\'t know how to set "' . $key . '" in "' . $type . '". ';

        throw new \InvalidArgumentException($message);
    }
protected function applyChainForSet($key, $value, $subject)
    {
        foreach ($this->accessors as $accessor) {
            if ($accessor->canAccessForWrite($key, $subject)) {
                return $accessor->set($key, $value, $subject);
            }
        }

        $type    = (is_object($subject) ? get_class($subject) : gettype($subject));
        $message = 'Don\'t know how to set "' . $key . '" in "' . $type . '". ';

        throw new \InvalidArgumentException($message);
    }
protected function applyChainForSet ( $ key , $ value , $ subject ) { foreach ( $ this -> accessors as $ accessor ) { if ( $ accessor -> canAccessForWrite ( $ key , $ subject ) ) { return $ accessor -> set ( $ key , $ value , $ subject ) ; } } $ type = ( is_object ( $ subject ) ? get_class ( $ subject ) : gettype ( $ subject ) ) ; $ message = 'Don\'t know how to set "' . $ key . '" in "' . $ type . '". ' ; throw new \ InvalidArgumentException ( $ message ) ; }
@param string $key
@param string $value
@param mixed  $subject

@return mixed
@param string $key @param string $value @param mixed $subject