Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • AcceptHeader
  • AcceptHeaderItem
  • ApacheRequest
  • BinaryFileResponse
  • Cookie
  • ExpressionRequestMatcher
  • FileBag
  • HeaderBag
  • IpUtils
  • JsonResponse
  • ParameterBag
  • RedirectResponse
  • Request
  • RequestMatcher
  • RequestStack
  • Response
  • ResponseHeaderBag
  • ServerBag
  • StreamedResponse

Interfaces

  • RequestMatcherInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class ParameterBag

ParameterBag is a container for key/value pairs.

Symfony\Component\HttpFoundation\ParameterBag implements IteratorAggregate, Countable

Direct known subclasses

Symfony\Component\HttpFoundation\FileBag, Symfony\Component\HttpFoundation\ServerBag
Namespace: Symfony\Component\HttpFoundation
Author: Fabien Potencier fabien@symfony.com
Api
Located at ParameterBag.php
Methods summary
public
# __construct( array $parameters = array() )

Constructor.

Constructor.

Parameters

$parameters
An array of parameters

Api

public array
# all( )

Returns the parameters.

Returns the parameters.

Returns

array
An array of parameters

Api

public array
# keys( )

Returns the parameter keys.

Returns the parameter keys.

Returns

array
An array of parameter keys

Api

public
# replace( array $parameters = array() )

Replaces the current parameters by a new set.

Replaces the current parameters by a new set.

Parameters

$parameters
An array of parameters

Api

public
# add( array $parameters = array() )

Adds parameters.

Adds parameters.

Parameters

$parameters
An array of parameters

Api

public mixed
# get( string $path, mixed $default = null, boolean $deep = false )

Returns a parameter by name.

Returns a parameter by name.

Parameters

$path
The key
$default
The default value if the parameter key does not exist
$deep
If true, a path like foo[bar] will find deeper items

Returns

mixed

Throws

InvalidArgumentException

Api

public
# set( string $key, mixed $value )

Sets a parameter by name.

Sets a parameter by name.

Parameters

$key
The key
$value
The value

Api

public boolean
# has( string $key )

Returns true if the parameter is defined.

Returns true if the parameter is defined.

Parameters

$key
The key

Returns

boolean
true if the parameter exists, false otherwise

Api

public
# remove( string $key )

Removes a parameter.

Removes a parameter.

Parameters

$key
The key

Api

public string
# getAlpha( string $key, mixed $default = '', boolean $deep = false )

Returns the alphabetic characters of the parameter value.

Returns the alphabetic characters of the parameter value.

Parameters

$key
The parameter key
$default
The default value if the parameter key does not exist
$deep
If true, a path like foo[bar] will find deeper items

Returns

string
The filtered value

Api

public string
# getAlnum( string $key, mixed $default = '', boolean $deep = false )

Returns the alphabetic characters and digits of the parameter value.

Returns the alphabetic characters and digits of the parameter value.

Parameters

$key
The parameter key
$default
The default value if the parameter key does not exist
$deep
If true, a path like foo[bar] will find deeper items

Returns

string
The filtered value

Api

public string
# getDigits( string $key, mixed $default = '', boolean $deep = false )

Returns the digits of the parameter value.

Returns the digits of the parameter value.

Parameters

$key
The parameter key
$default
The default value if the parameter key does not exist
$deep
If true, a path like foo[bar] will find deeper items

Returns

string
The filtered value

Api

public integer
# getInt( string $key, mixed $default = 0, boolean $deep = false )

Returns the parameter value converted to integer.

Returns the parameter value converted to integer.

Parameters

$key
The parameter key
$default
The default value if the parameter key does not exist
$deep
If true, a path like foo[bar] will find deeper items

Returns

integer
The filtered value

Api

public boolean
# getBoolean( string $key, mixed $default = false, boolean $deep = false )

Returns the parameter value converted to boolean.

Returns the parameter value converted to boolean.

Parameters

$key
The parameter key
$default
The default value if the parameter key does not exist
$deep
If true, a path like foo[bar] will find deeper items

Returns

boolean
The filtered value
public mixed
# filter( string $key, mixed $default = null, boolean $deep = false, integer $filter = FILTER_DEFAULT, mixed $options = array() )

Filter key.

Filter key.

Parameters

$key
Key.
$default
Default = null.
$deep
Default = false.
$filter
FILTER_* constant.
$options
Filter options.

Returns

mixed

See

http://php.net/manual/en/function.filter-var.php
public ArrayIterator
# getIterator( )

Returns an iterator for parameters.

Returns an iterator for parameters.

Returns

ArrayIterator
An \ArrayIterator instance

Implementation of

IteratorAggregate::getIterator()
public integer
# count( )

Returns the number of parameters.

Returns the number of parameters.

Returns

integer
The number of parameters

Implementation of

Countable::count()
Properties summary
protected array $parameters

Parameter storage.

Parameter storage.

#
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen