| 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 $name The name of the route to lookup. | ||
| 49 | * | ||
| 50 | * @param array $data The data to pass into the route. | ||
| 51 | * | ||
| 52 | * @param bool $returnRawUrl Whether or not to return the raw url. | ||
| 53 | * | ||
| 54 | * @return string The results of calling the appropriate _Generator_ method . | ||
| 55 | * | ||
| 56 | * @throws RouteNotFound When the route cannot be found. | ||
| 57 | * | ||
| 58 | */ | ||
| 59 | 2 | public function __invoke($name, array $data = [], $returnRawUrl = false) | |
| 65 | } |