PHP Class Microweber\Providers\UrlManager

Show file Open project: microweber/microweber

Public Properties

Property Type Description
$current_url_var
$repaced_urls
$site_url_var

Public Methods

Method Description
api_link ( $str = '' )
current ( boolean $skip_ajax = false, boolean $no_get = false ) : string Returns the current url as a string.
download ( $requestUrl, $post_params = false, $save_to_file = false )
hostname ( )
is_ajax ( ) : true | false Return true if the current request is via ajax.
link_to_file ( $path )
param ( $param, $skip_ajax = false, $force_url = false )
param_set ( $param, $value = false, $url = false )
param_unset ( $param, $url = false )
params ( $skip_ajax = false )
redirect ( $url )
replace_site_url ( $arr )
replace_site_url_back ( $arr )
segment ( $num, boolean $page_url = false ) : string | false Returns single URL segment.
segments ( boolean $page_url = false ) : array | false Returns ALL URL segments as array.
set ( $url = false )
set_current ( $url = false )
site ( $add_string = false )
site_url ( $add_string = false )
slug ( $text )
string ( boolean $skip_ajax = false ) : string Returns the current url path, does not include the domain name.
strleft ( $s1, $s2 )
to_path ( $path )

Method Details

current() public method

Returns the current url as a string.
public current ( boolean $skip_ajax = false, boolean $no_get = false ) : string
$skip_ajax boolean If true it will try to get the referring url from ajax request
$no_get boolean If true it will remove the params after '?'
return string the url string

download() public method

public download ( $requestUrl, $post_params = false, $save_to_file = false )

hostname() public method

public hostname ( )

is_ajax() public method

Return true if the current request is via ajax.
public is_ajax ( ) : true | false
return true | false

param() public method

public param ( $param, $skip_ajax = false, $force_url = false )

param_set() public method

public param_set ( $param, $value = false, $url = false )

param_unset() public method

public param_unset ( $param, $url = false )

params() public method

public params ( $skip_ajax = false )

redirect() public method

public redirect ( $url )

replace_site_url() public method

public replace_site_url ( $arr )

replace_site_url_back() public method

public replace_site_url_back ( $arr )

segment() public method

Returns single URL segment.
public segment ( $num, boolean $page_url = false ) : string | false
$num The segment number
$page_url boolean If false it will use the current URL
return string | false the url segment or false

segments() public method

Returns ALL URL segments as array.
public segments ( boolean $page_url = false ) : array | false
$page_url boolean If false it will use the current URL
return array | false the url segments or false

set() public method

public set ( $url = false )

set_current() public method

public set_current ( $url = false )

site() public method

public site ( $add_string = false )

site_url() public method

public site_url ( $add_string = false )

slug() public method

public slug ( $text )

string() public method

Returns the current url path, does not include the domain name.
public string ( boolean $skip_ajax = false ) : string
$skip_ajax boolean If true it will try to get the referring url from ajax request
return string the url string

strleft() public method

public strleft ( $s1, $s2 )

to_path() public method

public to_path ( $path )

Property Details

$current_url_var public property

public $current_url_var

$repaced_urls public property

public $repaced_urls

$site_url_var public property

public $site_url_var