UrlType::getBlockPrefix()

string getBlockPrefix() Returns the prefix of the template block name for this type. The block prefix defaults to the underscored short class name with the "Type" suffix removed (e.g. "UserProfileType" => "user_profile"). Return Value string The prefix of the template block name

UrlPackage::getUrl()

string getUrl(string $path) Returns an absolute or root-relative public path. Parameters string $path A path Return Value string The public path

UrlPackage deprecated::getUrl()

string getUrl(string $path, string|bool|null $version = null) Returns an absolute or root-relative public path. Parameters string $path A path string|bool|null $version A specific version for the path Return Value string The public path

UrlPackage deprecated

class UrlPackage extends Package deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. The URL packages adds a version and a base URL to asset URLs. Methods __construct(string|array $baseUrls = array(), string $version = null, string $format = null) Constructor. string getVersion() Returns the asset package version. from Package string getUrl(string $path, string|bool|null $version = null) Returns an absolute or root-relative public path. string

UrlPackage::getBaseUrl()

string getBaseUrl(string $path) Returns the base URL for a path. Parameters string $path Return Value string The base URL

UrlPackage deprecated::getBaseUrl()

string getBaseUrl(string $path) Returns the base URL for a path. Parameters string $path Return Value string The base URL

UrlMatcherInterface

interface UrlMatcherInterface implements RequestContextAwareInterface UrlMatcherInterface is the interface that all URL matcher classes must implement. Methods setContext(RequestContext $context) Sets the request context. from RequestContextAwareInterface RequestContext getContext() Gets the request context. from RequestContextAwareInterface array match(string $pathinfo) Tries to match a URL path with a set of routes. Details setContext(RequestCon

UrlPackage

class UrlPackage extends Package Package that adds a base URL to asset URLs in addition to a version. The package allows to use more than one base URLs in which case it randomly chooses one for each asset; it also guarantees that any given path will always use the same base URL to be nice with HTTP caching mechanisms. When the request context is available, this package can choose the best base URL to use based on the current request scheme: For HTTP request, it chooses between all base URLs;

UrlMatcher::setContext()

setContext(RequestContext $context) Sets the request context. Parameters RequestContext $context The context

UrlMatcher::match()

array match(string $pathinfo) Tries to match a URL path with a set of routes. If the matcher can not find information, it must throw one of the exceptions documented below. Parameters string $pathinfo The path info to be parsed (raw format, i.e. not urldecoded) Return Value array An array of parameters Exceptions ResourceNotFoundException If the resource could not be found MethodNotAllowedException If the resource was found but the request method is not allowed