Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • ArrayNodeDefinition
  • BooleanNodeDefinition
  • EnumNodeDefinition
  • ExprBuilder
  • FloatNodeDefinition
  • IntegerNodeDefinition
  • MergeBuilder
  • NodeBuilder
  • NodeDefinition
  • NormalizationBuilder
  • NumericNodeDefinition
  • ScalarNodeDefinition
  • TreeBuilder
  • ValidationBuilder
  • VariableNodeDefinition

Interfaces

  • NodeParentInterface
  • ParentNodeDefinitionInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class ExprBuilder

This class builds an if expression.

Namespace: Symfony\Component\Config\Definition\Builder
Author: Johannes M. Schmitt <schmittjoh@gmail.com>
Author: Christophe Coevoet <stof@notk.org>
Located at config/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
Methods summary
public
# __construct( Symfony\Component\Config\Definition\Builder\NodeDefinition $node )

Constructor

Constructor

Parameters

$node
Symfony\Component\Config\Definition\Builder\NodeDefinition
$node The related node
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# always( Closure $then = null )

Marks the expression as being always used.

Marks the expression as being always used.

Parameters

$then
Closure
$then

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# ifTrue( Closure $closure = null )

Sets a closure to use as tests.

Sets a closure to use as tests.

The default one tests if the value is true.

Parameters

$closure
Closure
$closure

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# ifString( )

Tests if the value is a string.

Tests if the value is a string.

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# ifNull( )

Tests if the value is null.

Tests if the value is null.

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# ifArray( )

Tests if the value is an array.

Tests if the value is an array.

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# ifInArray( array $array )

Tests if the value is in an array.

Tests if the value is in an array.

Parameters

$array
array
$array

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# ifNotInArray( array $array )

Tests if the value is not in an array.

Tests if the value is not in an array.

Parameters

$array
array
$array

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# then( Closure $closure )

Sets the closure to run if the test pass.

Sets the closure to run if the test pass.

Parameters

$closure
Closure
$closure

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# thenEmptyArray( )

Sets a closure returning an empty array.

Sets a closure returning an empty array.

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# thenInvalid( string $message )

Sets a closure marking the value as invalid at validation time.

Sets a closure marking the value as invalid at validation time.

if you want to add the value of the node in your message just use a %s placeholder.

Parameters

$message
string
$message

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder

Throws

InvalidArgumentException
public Symfony\Component\Config\Definition\Builder\ExprBuilder
# thenUnset( )

Sets a closure unsetting this key of the array at validation time.

Sets a closure unsetting this key of the array at validation time.

Returns

Symfony\Component\Config\Definition\Builder\ExprBuilder

Throws

Symfony\Component\Config\Definition\Exception\UnsetKeyException
public Symfony\Component\Config\Definition\Builder\NodeDefinition
# end( )

Returns the related node

Returns the related node

Returns

Symfony\Component\Config\Definition\Builder\NodeDefinition

Throws

RuntimeException
public static array
# buildExpressions( array $expressions )

Builds the expressions.

Builds the expressions.

Parameters

$expressions
Symfony\Component\Config\Definition\Builder\ExprBuilder[]
$expressions An array of ExprBuilder instances to build

Returns

array
Properties summary
protected mixed $node
#
public mixed $ifPart
#
public mixed $thenPart
#
php-coveralls API documentation generated by ApiGen 2.8.0