/
PagedRouteProviderInterface.php
49 lines (46 loc) · 1.36 KB
/
PagedRouteProviderInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* This file is part of the Symfony CMF package.
*
* (c) 2011-2014 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2015 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Cmf\Component\Routing;
/**
* Interface for a provider which allows to retrieve a limited amount of routes.
*/
interface PagedRouteProviderInterface extends RouteProviderInterface
{
/**
* Find an amount of routes with an offset and possible a limit.
*
* In case you want to iterate over all routes, you want to avoid to load
* all routes at once.
*
* @param int $offset
* The sequence will start with that offset in the list of all routes.
* @param int $length [optional]
* The sequence will have that many routes in it. If no length is
* specified all routes are returned.
*
* @return \Symfony\Component\Routing\Route[]
* Routes keyed by the route name.
*/
public function getRoutesPaged($offset, $length = null);
/**
* Determines the total amount of routes.
*
* @return int
*/
public function getRoutesCount();
}