Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MaxDepth.php

function MaxDepth::__construct

Parameters

int $maxDepth The maximum serialization depth:

File

vendor/symfony/serializer/Attribute/MaxDepth.php, line 25

Class

MaxDepth
@author Kévin Dunglas <dunglas@gmail.com>

Namespace

Symfony\Component\Serializer\Attribute

Code

public function __construct(int $maxDepth) {
    if ($maxDepth <= 0) {
        throw new InvalidArgumentException(\sprintf('Parameter given to "%s" must be a positive integer.', static::class));
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal