getUrl() публичный Метод

Recommended usage is to just pass the entire view name as the first and only arg: $blog_js = $simpleCache->getUrl('blog/save_draft.js'); $favicon = $simpleCache->getUrl('graphics/favicon.ico'); For backwards compatibility with older versions of Elgg, you can also pass "js" or "css" as the first arg, with the rest of the view name as the second arg: $blog_js = $simpleCache->getUrl('js', 'blog/save_draft.js'); This automatically registers the view with Elgg's simplecache.
public getUrl ( string $view, string $subview = '' ) : string
$view string The full view name
$subview string If the first arg is "css" or "js", the rest of the view name
Результат string
Пример #1
0
 public function testGetUrlHandlesTwoArgumentsWhereSecondArgHasRedundantPrefix()
 {
     $this->markTestIncomplete();
     $simpleCache = new SimpleCache();
     $url = $simpleCache->getUrl('js', 'js/view.js');
     $this->assertTrue(preg_match("#default/view.js\$#", $url));
 }