| @@ 37-47 (lines=11) @@ | ||
| 34 | * @return string |
|
| 35 | * @deprecated since 1.5 will be removed |
|
| 36 | */ |
|
| 37 | public static function getBaseUrl() |
|
| 38 | { |
|
| 39 | $container = Container::getInstance(); |
|
| 40 | if ($container->has('Phile_Router')) { |
|
| 41 | $router = $container->get('Phile_Router'); |
|
| 42 | } else { |
|
| 43 | // BC: some old 1.x plugins may call this before the core is initialized |
|
| 44 | $router = new Router; |
|
| 45 | } |
|
| 46 | return $router->getBaseUrl(); |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * detect install path |
|
| @@ 249-259 (lines=11) @@ | ||
| 246 | * |
|
| 247 | * @return string |
|
| 248 | */ |
|
| 249 | public function getUrl() |
|
| 250 | { |
|
| 251 | $container = Container::getInstance(); |
|
| 252 | if ($container->has('Phile_Router')) { |
|
| 253 | $router = $container->get('Phile_Router'); |
|
| 254 | } else { |
|
| 255 | // BC: some old 1.x plugins may use Pages before the core is initialized |
|
| 256 | $router = new Router; |
|
| 257 | } |
|
| 258 | return $router->urlForPage($this->pageId, false); |
|
| 259 | } |
|
| 260 | ||
| 261 | /** |
|
| 262 | * set the filepath of the page |
|