[ Index ]

PHP Cross Reference of phpBB-3.3.5-deutsch

title

Body

[close]

/vendor/symfony/routing/ -> Route.php (summary)

(no description)

File Size: 558 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Route:: (34 methods):
  __construct()
  serialize()
  unserialize()
  getPath()
  setPath()
  getHost()
  setHost()
  getSchemes()
  setSchemes()
  hasScheme()
  getMethods()
  setMethods()
  getOptions()
  setOptions()
  addOptions()
  setOption()
  getOption()
  hasOption()
  getDefaults()
  setDefaults()
  addDefaults()
  getDefault()
  hasDefault()
  setDefault()
  getRequirements()
  setRequirements()
  addRequirements()
  getRequirement()
  hasRequirement()
  setRequirement()
  getCondition()
  setCondition()
  compile()
  sanitizeRequirement()


Class: Route  - X-Ref

A Route describes a route and its parameters.

__construct($path, array $defaults = [], array $requirements = [], array $options = [], $host = '', $schemes = [], $methods = [], $condition = '')   X-Ref
Constructor.

Available options:

* compiler_class: A class name able to compile this route instance (RouteCompiler by default)
* utf8:           Whether UTF-8 matching is enforced ot not

param: string          $path         The path pattern to match
param: array           $defaults     An array of default parameter values
param: array           $requirements An array of requirements for parameters (regexes)
param: array           $options      An array of options
param: string          $host         The host pattern to match
param: string|string[] $schemes      A required URI scheme or an array of restricted schemes
param: string|string[] $methods      A required HTTP method or an array of restricted methods
param: string          $condition    A condition that should evaluate to true for the route to match

serialize()   X-Ref
{@inheritdoc}


unserialize($serialized)   X-Ref
{@inheritdoc}


getPath()   X-Ref
Returns the pattern for the path.

return: string The path pattern

setPath($pattern)   X-Ref
Sets the pattern for the path.

This method implements a fluent interface.

param: string $pattern The path pattern
return: $this

getHost()   X-Ref
Returns the pattern for the host.

return: string The host pattern

setHost($pattern)   X-Ref
Sets the pattern for the host.

This method implements a fluent interface.

param: string $pattern The host pattern
return: $this

getSchemes()   X-Ref
Returns the lowercased schemes this route is restricted to.
So an empty array means that any scheme is allowed.

return: string[] The schemes

setSchemes($schemes)   X-Ref
Sets the schemes (e.g. 'https') this route is restricted to.
So an empty array means that any scheme is allowed.

This method implements a fluent interface.

param: string|string[] $schemes The scheme or an array of schemes
return: $this

hasScheme($scheme)   X-Ref
Checks if a scheme requirement has been set.

param: string $scheme
return: bool true if the scheme requirement exists, otherwise false

getMethods()   X-Ref
Returns the uppercased HTTP methods this route is restricted to.
So an empty array means that any method is allowed.

return: string[] The methods

setMethods($methods)   X-Ref
Sets the HTTP methods (e.g. 'POST') this route is restricted to.
So an empty array means that any method is allowed.

This method implements a fluent interface.

param: string|string[] $methods The method or an array of methods
return: $this

getOptions()   X-Ref
Returns the options.

return: array The options

setOptions(array $options)   X-Ref
Sets the options.

This method implements a fluent interface.

param: array $options The options
return: $this

addOptions(array $options)   X-Ref
Adds options.

This method implements a fluent interface.

param: array $options The options
return: $this

setOption($name, $value)   X-Ref
Sets an option value.

This method implements a fluent interface.

param: string $name  An option name
param: mixed  $value The option value
return: $this

getOption($name)   X-Ref
Get an option value.

param: string $name An option name
return: mixed The option value or null when not given

hasOption($name)   X-Ref
Checks if an option has been set.

param: string $name An option name
return: bool true if the option is set, false otherwise

getDefaults()   X-Ref
Returns the defaults.

return: array The defaults

setDefaults(array $defaults)   X-Ref
Sets the defaults.

This method implements a fluent interface.

param: array $defaults The defaults
return: $this

addDefaults(array $defaults)   X-Ref
Adds defaults.

This method implements a fluent interface.

param: array $defaults The defaults
return: $this

getDefault($name)   X-Ref
Gets a default value.

param: string $name A variable name
return: mixed The default value or null when not given

hasDefault($name)   X-Ref
Checks if a default value is set for the given variable.

param: string $name A variable name
return: bool true if the default value is set, false otherwise

setDefault($name, $default)   X-Ref
Sets a default value.

param: string $name    A variable name
param: mixed  $default The default value
return: $this

getRequirements()   X-Ref
Returns the requirements.

return: array The requirements

setRequirements(array $requirements)   X-Ref
Sets the requirements.

This method implements a fluent interface.

param: array $requirements The requirements
return: $this

addRequirements(array $requirements)   X-Ref
Adds requirements.

This method implements a fluent interface.

param: array $requirements The requirements
return: $this

getRequirement($key)   X-Ref
Returns the requirement for the given key.

param: string $key The key
return: string|null The regex or null when not given

hasRequirement($key)   X-Ref
Checks if a requirement is set for the given key.

param: string $key A variable name
return: bool true if a requirement is specified, false otherwise

setRequirement($key, $regex)   X-Ref
Sets a requirement for the given key.

param: string $key   The key
param: string $regex The regex
return: $this

getCondition()   X-Ref
Returns the condition.

return: string The condition

setCondition($condition)   X-Ref
Sets the condition.

This method implements a fluent interface.

param: string $condition The condition
return: $this

compile()   X-Ref
Compiles the route.

return: CompiledRoute A CompiledRoute instance

sanitizeRequirement($key, $regex)   X-Ref
No description



Generated: Mon Oct 4 17:42:11 2021 Cross-referenced by PHPXref 0.7.1