PHP Class URL, someline-starter

Inheritance: extends Illuminate\Support\Facades\URL
Afficher le fichier Open project: someline/someline-starter Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

asset() public static méthode

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

assetFrom() public static méthode

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
Résultat string

current() public static méthode

Get the current URL for the request.
public static current ( ) : string
Résultat string

forceRootUrl() public static méthode

Set the forced root URL.
public static forceRootUrl ( string $root ) : void
$root string
Résultat void

forceSchema() public static méthode

Force the schema for URLs.
public static forceSchema ( string $schema ) : void
$schema string
Résultat void

full() public static méthode

Get the full URL for the current request.
public static full ( ) : string
Résultat string

getRequest() public static méthode

Get the request instance.
public static getRequest ( ) : Illuminate\Http\Request
Résultat Illuminate\Http\Request

hasMacro() public static méthode

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

isValidUrl() public static méthode

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

macro() public static méthode

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

previous() public static méthode

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

route() public static méthode

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

secure() public static méthode

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

secureAsset() public static méthode

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

setRequest() public static méthode

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

setRootControllerNamespace() public static méthode

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

setRoutes() public static méthode

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

setSessionResolver() public static méthode

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

to() public static méthode

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
Résultat string