| 1 | <?php | ||
| 21 | class Url | ||
| 22 | { | ||
| 23 | /** | ||
| 24 | * | ||
| 25 | * The Generator object used by the RouteContainer | ||
| 26 | * | ||
| 27 | * @var Generator | ||
| 28 | * | ||
| 29 | */ | ||
| 30 | protected $generator; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * | ||
| 34 | * Constructor. | ||
| 35 | * | ||
| 36 | * @param Generator $generator The generator object to use | ||
| 37 | * | ||
| 38 | */ | ||
| 39 | 3 | public function __construct(Generator $generator) | |
| 43 | |||
| 44 | /** | ||
| 45 | * | ||
| 46 | * Returns the Generator | ||
| 47 | * | ||
| 48 | * @param string|null $name The name of the route to lookup. | ||
| 49 | * | ||
| 50 | * @param array $data The data to pass into the route | ||
| 51 | * | ||
| 52 |      * @return Generator|string|false The generator object, or the results of {Aura\Router\Generator::generate()} | ||
| 53 | * when $name is null | ||
| 54 | * | ||
| 55 |      * @throws RouteNotFound When the route cannot be found, thrown by {Aura\Router\Generator::generate()} | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | 3 | public function __invoke($name = null, array $data = []) | |
| 64 | } |