Url
in package
Url helper
Table of Contents
Constants
- BASE_URL = DOMAIN . BASE_PATH
- COMPONENTS_URL = Self::VIEW_URL . '/components'
- EXTENSIONS_URL = Self::RELATIVE_APP_URL . '/extensions'
- LIBRARY_URL = Self::VIEW_URL . '/library'
- RELATIVE_APP_URL = BASE_PATH . '/arikaim'
- TEMPLATES_URL = Self::VIEW_URL . '/templates'
- VIEW_URL = Self::RELATIVE_APP_URL . '/view'
Methods
- addSchema() : string
- Add url schema
- getComponentsLibraryUrl() : string
- Get components library url
- getExtensionViewUrl() : string
- Get extension view url
- getLanguagePath() : string
- Get language path
- getLibraryFileUrl() : string
- Get UI library file url
- getLibraryThemeFileUrl() : string
- Get UI library theme file url
- getLibraryThemeUrl() : string
- Get UI library theme url
- getLibraryUrl() : string
- Get UI library url
- getTemplateThemesUrl() : string
- Get template themes url
- getTemplateThemeUrl() : string
- Get template theme url
- getTemplateUrl() : string
- Get template url
- getThemeFileUrl() : string|null
- Get theme file url
- getUrl() : string
- Return url link with current language code
- getUrlFileName() : string|null
- Get url file name
- getUrlParam() : string|null
- Get url query param value
- init() : void
- Init domain and base path constants
- isRelative() : bool
- Retrun true if url is relative
- isRemote() : bool
- Return true if url is remote server
- isValid() : bool
- Return true if url is valid
- removeSchema() : string
- Remove url schema
- replaceUrlQueryParams() : string|null
- Replace url query vars with params array
- setAppUrl() : void
- Set app url
Constants
BASE_URL
public
mixed
BASE_URL
= DOMAIN . BASE_PATH
COMPONENTS_URL
public
mixed
COMPONENTS_URL
= Self::VIEW_URL . '/components'
EXTENSIONS_URL
public
mixed
EXTENSIONS_URL
= Self::RELATIVE_APP_URL . '/extensions'
LIBRARY_URL
public
mixed
LIBRARY_URL
= Self::VIEW_URL . '/library'
RELATIVE_APP_URL
public
mixed
RELATIVE_APP_URL
= BASE_PATH . '/arikaim'
TEMPLATES_URL
public
mixed
TEMPLATES_URL
= Self::VIEW_URL . '/templates'
VIEW_URL
public
mixed
VIEW_URL
= Self::RELATIVE_APP_URL . '/view'
Methods
addSchema()
Add url schema
public
static addSchema(string $url[, string $schema = 'http://' ]) : string
Parameters
- $url : string
- $schema : string = 'http://'
Return values
stringgetComponentsLibraryUrl()
Get components library url
public
static getComponentsLibraryUrl(string $name[, string $path = '' ][, bool $relative = true ]) : string
Parameters
- $name : string
- $path : string = ''
- $relative : bool = true
Return values
stringgetExtensionViewUrl()
Get extension view url
public
static getExtensionViewUrl(string $extension[, string $path = '' ][, bool $relative = true ]) : string
Parameters
- $extension : string
- $path : string = ''
- $relative : bool = true
Return values
stringgetLanguagePath()
Get language path
public
static getLanguagePath(string $path, string $language) : string
Parameters
- $path : string
- $language : string
Return values
stringgetLibraryFileUrl()
Get UI library file url
public
static getLibraryFileUrl(string $library[, string|null $fileName = '' ][, array<string|int, mixed>|null $params = null ]) : string
Parameters
- $library : string
- $fileName : string|null = ''
- $params : array<string|int, mixed>|null = null
Return values
stringgetLibraryThemeFileUrl()
Get UI library theme file url
public
static getLibraryThemeFileUrl(string $library, string $file, string $theme) : string
Parameters
- $library : string
- $file : string
- $theme : string
Return values
stringgetLibraryThemeUrl()
Get UI library theme url
public
static getLibraryThemeUrl(string $library, string $theme) : string
Parameters
- $library : string
- $theme : string
Return values
stringgetLibraryUrl()
Get UI library url
public
static getLibraryUrl(string $library[, bool $relative = true ]) : string
Parameters
- $library : string
- $relative : bool = true
Return values
stringgetTemplateThemesUrl()
Get template themes url
public
static getTemplateThemesUrl(string $template) : string
Parameters
- $template : string
Return values
stringgetTemplateThemeUrl()
Get template theme url
public
static getTemplateThemeUrl(string $template, string $theme) : string
Parameters
- $template : string
- $theme : string
Return values
stringgetTemplateUrl()
Get template url
public
static getTemplateUrl(string $template[, string $path = '' ][, bool $relative = true ]) : string
Parameters
- $template : string
- $path : string = ''
- $relative : bool = true
Return values
stringgetThemeFileUrl()
Get theme file url
public
static getThemeFileUrl(string $template, string $theme, string|null $themeFile) : string|null
Parameters
- $template : string
- $theme : string
- $themeFile : string|null
Return values
string|nullgetUrl()
Return url link with current language code
public
static getUrl([string $path = '' ][, bool $relative = false ][, string|null $language = null ][, string|null $defaultLanguage = null ]) : string
Parameters
- $path : string = ''
- $relative : bool = false
- $language : string|null = null
- $defaultLanguage : string|null = null
Return values
stringgetUrlFileName()
Get url file name
public
static getUrlFileName(string $url) : string|null
Parameters
- $url : string
Return values
string|nullgetUrlParam()
Get url query param value
public
static getUrlParam(string|null $url, string $paramName) : string|null
Parameters
- $url : string|null
- $paramName : string
Return values
string|nullinit()
Init domain and base path constants
public
static init(string $domain, string $basePath) : void
Parameters
- $domain : string
- $basePath : string
isRelative()
Retrun true if url is relative
public
static isRelative(string $url) : bool
Parameters
- $url : string
Return values
boolisRemote()
Return true if url is remote server
public
static isRemote(string $url) : bool
Parameters
- $url : string
Return values
boolisValid()
Return true if url is valid
public
static isValid(string $url) : bool
Parameters
- $url : string
Return values
boolremoveSchema()
Remove url schema
public
static removeSchema(string $url) : string
Parameters
- $url : string
Return values
stringreplaceUrlQueryParams()
Replace url query vars with params array
public
static replaceUrlQueryParams(string $url, array<string|int, mixed> $params) : string|null
Parameters
- $url : string
- $params : array<string|int, mixed>
Return values
string|nullsetAppUrl()
Set app url
public
static setAppUrl(string $path) : void
Parameters
- $path : string