| @@ 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 |
|
| @@ 252-262 (lines=11) @@ | ||
| 249 | * |
|
| 250 | * @return string |
|
| 251 | */ |
|
| 252 | public function getUrl() |
|
| 253 | { |
|
| 254 | $container = Container::getInstance(); |
|
| 255 | if ($container->has('Phile_Router')) { |
|
| 256 | $router = $container->get('Phile_Router'); |
|
| 257 | } else { |
|
| 258 | // BC: some old 1.x plugins may use Pages before the core is initialized |
|
| 259 | $router = new Router; |
|
| 260 | } |
|
| 261 | return $router->urlForPage($this->pageId, false); |
|
| 262 | } |
|
| 263 | ||
| 264 | /** |
|
| 265 | * set the filepath of the page |
|