Example #1
0
 /**
  * Adds a Route to the beginning of current collection.
  *
  * @param string $name  Route name.
  * @param Route  $route Instance of Route.
  */
 public function prepend($name, Route $route)
 {
     $this->routes->prepend($name, $route);
 }
Example #2
0
 /**
  * Add handler to logger
  * Handlers are being prepended to the handlers array, so the last added handler will be executed first
  *
  * @param HandlerAbstract $handler
  */
 public function addHandler(HandlerAbstract $handler)
 {
     $this->handlers->prepend($handler);
 }
Example #3
0
 /**
  * @dataProvider arraySet2
  */
 public function testPrepend2($array)
 {
     $a = new ArrayObject($array);
     $a->prepend('k512', 'val');
     $array = array('k512' => 'val') + $array;
     $this->assertSame($array, $a->val());
 }