PHP Class URL, someline-starter

Inheritance: extends Illuminate\Support\Facades\URL
Exibir arquivo Open project: someline/someline-starter Class Usage Examples

Public Methods

Method Description
action ( string $action, mixed $parameters = [], boolean $absolute = true ) : string Get the URL to a controller action.
asset ( string $path, boolean | null $secure = null ) : string Generate a URL to an application asset.
assetFrom ( string $root, string $path, boolean | null $secure = null ) : string Generate a URL to an asset from a custom root domain such as CDN, etc.
current ( ) : string Get the current URL for the request.
forceRootUrl ( string $root ) : void Set the forced root URL.
forceSchema ( string $schema ) : void Force the schema for URLs.
full ( ) : string Get the full URL for the current request.
getRequest ( ) : Illuminate\Http\Request Get the request instance.
hasMacro ( string $name ) : boolean Checks if macro is registered.
isValidUrl ( string $path ) : boolean Determine if the given path is a valid URL.
macro ( string $name, callable $macro ) : void Register a custom macro.
previous ( mixed $fallback = false ) : string Get the URL for the previous request.
route ( string $name, mixed $parameters = [], boolean $absolute = true ) : string Get the URL to a named route.
secure ( string $path, array $parameters = [] ) : string Generate a secure, absolute URL to the given path.
secureAsset ( string $path ) : string Generate a URL to a secure asset.
setRequest ( Illuminate\Http\Request $request ) : void Set the current request instance.
setRootControllerNamespace ( string $rootNamespace ) Set the root controller namespace.
setRoutes ( Illuminate\Routing\RouteCollection $routes ) Set the route collection.
setSessionResolver ( callable $sessionResolver ) Set the session resolver for the generator.
to ( string $path, mixed $extra = [], boolean | null $secure = null ) : string Generate an absolute URL to the given path.

Method Details

action() public static method

Get the URL to a controller action.
public static action ( string $action, mixed $parameters = [], boolean $absolute = true ) : string
$action string
$parameters mixed
$absolute boolean
return string

asset() public static method

Generate a URL to an application asset.
public static asset ( string $path, boolean | null $secure = null ) : string
$path string
$secure boolean | null
return string

assetFrom() public static method

Generate a URL to an asset from a custom root domain such as CDN, etc.
public static assetFrom ( string $root, string $path, boolean | null $secure = null ) : string
$root string
$path string
$secure boolean | null
return string

current() public static method

Get the current URL for the request.
public static current ( ) : string
return string

forceRootUrl() public static method

Set the forced root URL.
public static forceRootUrl ( string $root ) : void
$root string
return void

forceSchema() public static method

Force the schema for URLs.
public static forceSchema ( string $schema ) : void
$schema string
return void

full() public static method

Get the full URL for the current request.
public static full ( ) : string
return string

getRequest() public static method

Get the request instance.
public static getRequest ( ) : Illuminate\Http\Request
return Illuminate\Http\Request

hasMacro() public static method

Checks if macro is registered.
public static hasMacro ( string $name ) : boolean
$name string
return boolean

isValidUrl() public static method

Determine if the given path is a valid URL.
public static isValidUrl ( string $path ) : boolean
$path string
return boolean

macro() public static method

Register a custom macro.
public static macro ( string $name, callable $macro ) : void
$name string
$macro callable
return void

previous() public static method

Get the URL for the previous request.
public static previous ( mixed $fallback = false ) : string
$fallback mixed
return string

route() public static method

Get the URL to a named route.
public static route ( string $name, mixed $parameters = [], boolean $absolute = true ) : string
$name string
$parameters mixed
$absolute boolean
return string

secure() public static method

Generate a secure, absolute URL to the given path.
public static secure ( string $path, array $parameters = [] ) : string
$path string
$parameters array
return string

secureAsset() public static method

Generate a URL to a secure asset.
public static secureAsset ( string $path ) : string
$path string
return string

setRequest() public static method

Set the current request instance.
public static setRequest ( Illuminate\Http\Request $request ) : void
$request Illuminate\Http\Request
return void

setRootControllerNamespace() public static method

Set the root controller namespace.
public static setRootControllerNamespace ( string $rootNamespace )
$rootNamespace string

setRoutes() public static method

Set the route collection.
public static setRoutes ( Illuminate\Routing\RouteCollection $routes )
$routes Illuminate\Routing\RouteCollection

setSessionResolver() public static method

Set the session resolver for the generator.
public static setSessionResolver ( callable $sessionResolver )
$sessionResolver callable

to() public static method

Generate an absolute URL to the given path.
public static to ( string $path, mixed $extra = [], boolean | null $secure = null ) : string
$path string
$extra mixed
$secure boolean | null
return string