public function setPager($name, $pager)
    {
        $pg = $this->app['pager']->createPager($name);

        foreach ($pager as $prop => $value) {
            $pg->$prop = $value;
        }

        return $this;
    }