PHP Class Arcanedev\Localization\Utilities\Url

Author: ARCANEDEV ([email protected])
Inheritance: implements Arcanedev\Localization\Contracts\UrlInterface
Show file Open project: arcanedev/localization Class Usage Examples

Public Methods

Method Description
extractAttributes ( boolean | false | string $url = false ) : array Extract attributes for current url.
substituteAttributes ( array $attributes, string $uri ) : string Change uri attributes (wildcards) for the ones in the $attributes array.
unparse ( array | false $parsed ) : string Build URL using array data from parse_url.

Private Methods

Method Description
checkParsedUrl ( array &$parsed ) Check parsed URL.
extractAttributesFromRoutes ( array $url, Illuminate\Routing\RouteCollection $routes ) : array Extract attributes from routes.
extractAttributesFromSegment ( array $url, array $path, integer $i, integer $j, string $segment, array &$attributes ) Extract attribute from a segment.
getAuthority ( array $parsed ) : string Get authority.
getFragment ( array $parsed ) : string Get fragment.
getHierPart ( array $parsed ) : string Get hier part.
getHost ( array $parsed ) : string Get host.
getQuery ( array $parsed ) : string Get Query.
getUrl ( array $parsed ) : string Get URL.
getUserInfo ( array $parsed ) : string Get user info.
hasAttributesFromUriPath ( array $url, string $path, array &$attributes ) : boolean Check if has attributes from a route.

Method Details

extractAttributes() public static method

Extract attributes for current url.
public static extractAttributes ( boolean | false | string $url = false ) : array
$url boolean | false | string
return array

substituteAttributes() public static method

Change uri attributes (wildcards) for the ones in the $attributes array.
public static substituteAttributes ( array $attributes, string $uri ) : string
$attributes array
$uri string
return string

unparse() public static method

Build URL using array data from parse_url.
public static unparse ( array | false $parsed ) : string
$parsed array | false
return string