Overview

Namespaces

  • Evenement
  • None
  • PHP
  • Psr
    • Http
      • Message
  • Ratchet
    • Http
    • RFC6455
      • Handshake
      • Messaging
    • Server
    • Session
      • Serialize
      • Storage
        • Proxy
    • Wamp
    • WebSocket
  • React
    • EventLoop
      • Tick
      • Timer
    • Socket
    • Stream
  • Symfony
    • Component
      • HttpFoundation
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
      • Routing
        • Annotation
        • Exception
        • Generator
          • Dumper
        • Loader
          • DependencyInjection
        • Matcher
          • Dumper
        • Tests
          • Annotation
          • Fixtures
            • AnnotatedClasses
            • OtherAnnotatedClasses
          • Generator
            • Dumper
          • Loader
          • Matcher
            • Dumper

Classes

  • CompiledRoute
  • RequestContext
  • Route
  • RouteCollection
  • RouteCollectionBuilder
  • RouteCompiler
  • Router

Interfaces

  • RequestContextAwareInterface
  • RouteCompilerInterface
  • RouterInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class RequestContext

Holds information about the current request.

This class implements a fluent interface.

Namespace: Symfony\Component\Routing
Author: Fabien Potencier <fabien@symfony.com>
Author: Tobias Schultze <http://tobion.de>
Located at RequestContext.php
Methods summary
public
# __construct( string $baseUrl = '', string $method = 'GET', string $host = 'localhost', string $scheme = 'http', integer $httpPort = 80, integer $httpsPort = 443, string $path = '/', string $queryString = '' )

Constructor.

Constructor.

Parameters

$baseUrl
string
$baseUrl The base URL
$method
string
$method The HTTP method
$host
string
$host The HTTP host name
$scheme
string
$scheme The HTTP scheme
$httpPort
integer
$httpPort The HTTP port
$httpsPort
integer
$httpsPort The HTTPS port
$path
string
$path The path
$queryString
string
$queryString The query string
public mixed
# fromRequest( Symfony\Component\HttpFoundation\Request $request )

Updates the RequestContext information based on a HttpFoundation Request.

Updates the RequestContext information based on a HttpFoundation Request.

Parameters

$request
Symfony\Component\HttpFoundation\Request
$request A Request instance

Returns

mixed
$this
public string
# getBaseUrl( )

Gets the base URL.

Gets the base URL.

Returns

string
The base URL
public mixed
# setBaseUrl( string $baseUrl )

Sets the base URL.

Sets the base URL.

Parameters

$baseUrl
string
$baseUrl The base URL

Returns

mixed
$this
public string
# getPathInfo( )

Gets the path info.

Gets the path info.

Returns

string
The path info
public mixed
# setPathInfo( string $pathInfo )

Sets the path info.

Sets the path info.

Parameters

$pathInfo
string
$pathInfo The path info

Returns

mixed
$this
public string
# getMethod( )

Gets the HTTP method.

Gets the HTTP method.

The method is always an uppercased string.

Returns

string
The HTTP method
public mixed
# setMethod( string $method )

Sets the HTTP method.

Sets the HTTP method.

Parameters

$method
string
$method The HTTP method

Returns

mixed
$this
public string
# getHost( )

Gets the HTTP host.

Gets the HTTP host.

The host is always lowercased because it must be treated case-insensitive.

Returns

string
The HTTP host
public mixed
# setHost( string $host )

Sets the HTTP host.

Sets the HTTP host.

Parameters

$host
string
$host The HTTP host

Returns

mixed
$this
public string
# getScheme( )

Gets the HTTP scheme.

Gets the HTTP scheme.

Returns

string
The HTTP scheme
public mixed
# setScheme( string $scheme )

Sets the HTTP scheme.

Sets the HTTP scheme.

Parameters

$scheme
string
$scheme The HTTP scheme

Returns

mixed
$this
public integer
# getHttpPort( )

Gets the HTTP port.

Gets the HTTP port.

Returns

integer
The HTTP port
public mixed
# setHttpPort( integer $httpPort )

Sets the HTTP port.

Sets the HTTP port.

Parameters

$httpPort
integer
$httpPort The HTTP port

Returns

mixed
$this
public integer
# getHttpsPort( )

Gets the HTTPS port.

Gets the HTTPS port.

Returns

integer
The HTTPS port
public mixed
# setHttpsPort( integer $httpsPort )

Sets the HTTPS port.

Sets the HTTPS port.

Parameters

$httpsPort
integer
$httpsPort The HTTPS port

Returns

mixed
$this
public string
# getQueryString( )

Gets the query string.

Gets the query string.

Returns

string
The query string without the "?"
public mixed
# setQueryString( string $queryString )

Sets the query string.

Sets the query string.

Parameters

$queryString
string
$queryString The query string (after "?")

Returns

mixed
$this
public array
# getParameters( )

Returns the parameters.

Returns the parameters.

Returns

array
The parameters
public mixed
# setParameters( array $parameters )

Sets the parameters.

Sets the parameters.

Parameters

$parameters
array
$parameters The parameters

Returns

mixed
$this
public mixed
# getParameter( string $name )

Gets a parameter value.

Gets a parameter value.

Parameters

$name
string
$name A parameter name

Returns

mixed
The parameter value or null if nonexistent
public boolean
# hasParameter( string $name )

Checks if a parameter value is set for the given parameter.

Checks if a parameter value is set for the given parameter.

Parameters

$name
string
$name A parameter name

Returns

boolean
True if the parameter value is set, false otherwise
public mixed
# setParameter( string $name, mixed $parameter )

Sets a parameter value.

Sets a parameter value.

Parameters

$name
string
$name A parameter name
$parameter
mixed
$parameter The parameter value

Returns

mixed
$this
Ratchet API documentation generated by ApiGen 2.8.0