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 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);
 }
Exemplo n.º 2
0
 /**
  * Sets a parameter.
  *
  * @param string $name  The parameter name
  * @param mixed  $value The parameter value
  */
 public function setParameter($name, $value)
 {
     $this->parameterBag->set($name, $value);
 }
Exemplo n.º 3
0
 /**
  * Sets a config.
  *
  * @param string $name  The config name
  * @param mixed  $value The config value
  */
 public function set($key, $value)
 {
     $this->parameterBag->set($key, $value);
 }