public function setParameters($subject, ParameterBagInterface $parameters)
    {
        if (!is_object($subject)) {
            throw new InvalidSubjectException($subject);
        }

        if ($subject instanceof ParameterBagAwareInterface) {
            $subject->setParameters($parameters);
        } else {
            foreach ($parameters as $key => $value) {
                $this->setParameter($subject, $key, $value);
            }
        }
    }
public function setParameters($subject, ParameterBagInterface $parameters)
    {
        if (!is_object($subject)) {
            throw new InvalidSubjectException($subject);
        }

        if ($subject instanceof ParameterBagAwareInterface) {
            $subject->setParameters($parameters);
        } else {
            foreach ($parameters as $key => $value) {
                $this->setParameter($subject, $key, $value);
            }
        }
    }
public function setParameters ( $ subject , ParameterBagInterface $ parameters ) { if ( ! is_object ( $ subject ) ) { throw new InvalidSubjectException ( $ subject ) ; } if ( $ subject instanceof ParameterBagAwareInterface ) { $ subject -> setParameters ( $ parameters ) ; } else { foreach ( $ parameters as $ key => $ value ) { $ this -> setParameter ( $ subject , $ key , $ value ) ; } } }
Set parameters on a subject.

@param mixed                 $subject
@param ParameterBagInterface $parameters

@return void

@throws InvalidSubjectException When the subject is not an object.
Set parameters on a subject .