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

Breadcrumb

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

class MaxDepth

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

Hierarchy

  • class \Symfony\Component\Serializer\Attribute\MaxDepth

Expanded class hierarchy of MaxDepth

1 file declares its use of MaxDepth
AttributeLoader.php in vendor/symfony/serializer/Mapping/Loader/AttributeLoader.php
1 string reference to 'MaxDepth'
AttributeMetadata::__sleep in vendor/symfony/serializer/Mapping/AttributeMetadata.php
Returns the names of the properties that should be serialized.

File

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

Namespace

Symfony\Component\Serializer\Attribute
View source
class MaxDepth {
    
    /**
     * @param int $maxDepth The maximum serialization depth
     */
    public function __construct(int $maxDepth) {
        if ($maxDepth <= 0) {
            throw new InvalidArgumentException(\sprintf('Parameter given to "%s" must be a positive integer.', static::class));
        }
    }
    public function getMaxDepth() : int {
        return $this->maxDepth;
    }

}

Members

Title Sort descending Modifiers Object type Summary
MaxDepth::getMaxDepth public function
MaxDepth::__construct public function
RSS feed
Powered by Drupal