[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

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

(no description)

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

Defines 1 class

Route:: (34 methods):
  __construct()
  serialize()
  unserialize()
  getPattern()
  setPattern()
  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()
  compile()
  sanitizeRequirement()


Class: Route  - X-Ref

A Route describes a route and its parameters.

__construct($path, array $defaults = array()   X-Ref
Constructor.

Available options:

* compiler_class: A class name able to compile this route instance (RouteCompiler by default)

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|array $schemes      A required URI scheme or an array of restricted schemes
param: string|array $methods      A required HTTP method or an array of restricted methods

serialize()   X-Ref
{@inheritdoc}


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


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

return: string The pattern

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

This method implements a fluent interface.

param: string $pattern The path pattern
return: Route The current Route instance

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: Route The current Route instance

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: Route The current Route instance

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

return: array 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|array $schemes The scheme or an array of schemes
return: Route The current Route instance

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: array 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|array $methods The method or an array of methods
return: Route The current Route instance

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: Route The current Route instance

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

This method implements a fluent interface.

param: array $options The options
return: Route The current Route instance

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: Route The current Route instance

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: Route The current Route instance

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

This method implements a fluent interface.

param: array $defaults The defaults
return: Route The current Route instance

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: Route The current Route instance

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: Route The current Route instance

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

This method implements a fluent interface.

param: array $requirements The requirements
return: Route The current Route instance

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: Route The current Route instance

compile()   X-Ref
Compiles the route.

return: CompiledRoute A CompiledRoute instance

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



Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1