all() 공개 메소드

Gets the service container parameters.
public all ( ) : array
리턴 array An array of parameters
예제 #1
0
 public function testRemove()
 {
     $bag = new ParameterBag(array('foo' => 'foo', 'bar' => 'bar'));
     $bag->remove('foo');
     $this->assertEquals(array('bar' => 'bar'), $bag->all(), '->remove() removes a parameter');
     $bag->remove('BAR');
     $this->assertEquals(array(), $bag->all(), '->remove() converts key to lowercase before removing');
 }
예제 #2
0
 /**
  * @covers Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::clear
  */
 public function testClear()
 {
     $bag = new ParameterBag($parameters = array(
         'foo' => 'foo',
         'bar' => 'bar',
     ));
     $bag->clear();
     $this->assertEquals(array(), $bag->all(), '->clear() removes all parameters');
 }
예제 #3
0
 /**
  * @covers Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::remove
  */
 public function testRemove()
 {
     $bag = new ParameterBag(array('foo' => 'foo', 'bar' => 'bar'));
     $bag->remove('foo');
     $this->assertEquals(array('bar' => 'bar'), $bag->all(), '->remove() removes a parameter');
 }
예제 #4
0
 /**
  * Return all parameters.
  *
  * @return array
  */
 public function getParameters()
 {
     return $this->parameters->all();
 }