Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface::set PHP Method

set() public method

Sets a service container parameter.
public set ( string $name, mixed $value )
$name string The parameter name
$value mixed The parameter value
    function set($name, $value);

Usage Example

 function it_sets_the_request_attribute_from_the_current_time(GetResponseEvent $event, ParameterBagInterface $attributesParameterBag)
 {
     $request = new Request([], [], [], [], [], []);
     $request->attributes = $attributesParameterBag->getWrappedObject();
     $event->getRequest()->willReturn($request);
     $attributesParameterBag->set('_tolerance_request_time', Argument::type('float'))->shouldBeCalled();
     $this->onRequest($event);
 }
All Usage Examples Of Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface::set