Overview
  • Namespace
  • Class

Namespaces

  • OneOfZero
    • Json
      • Annotations
      • ContractResolvers
      • Converters
      • Enums
      • Exceptions
      • Helpers
      • Mappers
        • AbstractArray
        • Annotation
        • Anonymous
        • Caching
        • Contract
        • File
        • Null
        • Reflection
      • Nodes
      • Visitors

Classes

  • Configuration
  • Convert
  • ConverterConfiguration
  • MetaHintWhitelist
  • Serializer

Interfaces

  • ReferableInterface
  • ReferenceResolverInterface
  • SerializerInterface

Class Configuration

The Configuration class provides various options that allow you to control the behaviour of the serializer.

Namespace: OneOfZero\Json
Located at Configuration.php

Methods summary

public OneOfZero\Json\MetaHintWhitelist
# getMetaHintWhitelist( )

Configures the whitelist that should be used to determine which classes may be used as meta type hints during deserialization.

Configures the whitelist that should be used to determine which classes may be used as meta type hints during deserialization.

Returns

OneOfZero\Json\MetaHintWhitelist
public OneOfZero\Json\ConverterConfiguration
# getConverters( )

Allows configuration of global and type-assigned converters.

Allows configuration of global and type-assigned converters.

Returns

OneOfZero\Json\ConverterConfiguration
public
# setMetaHintWhitelist( OneOfZero\Json\MetaHintWhitelist $metaHintWhitelist )

Parameters

$metaHintWhitelist
public
# setConverters( OneOfZero\Json\ConverterConfiguration $converters )

Parameters

$converters
public
# __construct( Interop\Container\ContainerInterface $container = null, boolean $loadDefaultConverters = true )

Parameters

$container
$loadDefaultConverters
public
# __clone( )
public string
# getHash( )

Returns a hash for this configuration.

Returns a hash for this configuration.

Returns

string

Properties summary

public boolean $strictTypeResolution

When enabled, a MissingTypeException will be thrown if the provided type hint or embedded type cannot be found. Otherwise the type information will be disregarded.

When enabled, a MissingTypeException will be thrown if the provided type hint or embedded type cannot be found. Otherwise the type information will be disregarded.

# false
public boolean $embedTypeMetadata

When enabled, type information will be embedded in serialized objects. This type information can be

When enabled, type information will be embedded in serialized objects. This type information can be

# true
public boolean $prettyPrint

Enable/disable pretty JSON printing.

Enable/disable pretty JSON printing.

# false
public integer $jsonEncodeOptions

Option flags that are passed to the internally used json_encode() and json_decode() functions.

Option flags that are passed to the internally used json_encode() and json_decode() functions.

# 0
public boolean $includeNullValues

Specifies whether members with null values should be included in serialization.

Specifies whether members with null values should be included in serialization.

# false
public integer $maxDepth

Specifies the maximum serialization depth for the internally used json_encode() and json_decode() functions.

Specifies the maximum serialization depth for the internally used json_encode() and json_decode() functions.

# 32
public integer $defaultReferenceResolutionStrategy

Specifies the default strategy for resolving references when deserializing.

Specifies the default strategy for resolving references when deserializing.

# OneOfZero\Json\ReferenceResolutionStrategy::LAZY
public integer $defaultMemberInclusionStrategy

Specifies one or more kinds of members that will be automatically included during serialization.

Specifies one or more kinds of members that will be automatically included during serialization.

The value uses bit flags, so you may use the bitwise OR (|) to specify multiple member kinds.

# OneOfZero\Json\IncludeStrategy::PUBLIC_PROPERTIES
public integer $defaultRecursionHandlingStrategy

Specifies the default handling strategy that will be used when recursion is detected during serialization.

Specifies the default handling strategy that will be used when recursion is detected during serialization.

# OneOfZero\Json\OnRecursion::THROW_EXCEPTION
public integer $defaultMaxDepthHandlingStrategy

Specifies the default handling strategy that will be used when the maximum depth is reached.

Specifies the default handling strategy that will be used when the maximum depth is reached.

# OneOfZero\Json\OnMaxDepth::THROW_EXCEPTION
public OneOfZero\Json\ContractResolvers\ContractResolverInterface|null $contractResolver

Configures the contract resolver to use during serialization and deserialization.

Configures the contract resolver to use during serialization and deserialization.

# null
API documentation generated by ApiGen