/** * 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); }
/** * 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); }
/** * @dataProvider arraySet2 */ public function testPrepend2($array) { $a = new ArrayObject($array); $a->prepend('k512', 'val'); $array = array('k512' => 'val') + $array; $this->assertSame($array, $a->val()); }