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

Breadcrumb

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

function SerializedPath::__construct

Parameters

string $serializedPath A path using a valid PropertyAccess syntax where the value is stored in a normalized representation:

File

vendor/symfony/serializer/Attribute/SerializedPath.php, line 29

Class

SerializedPath
@author Tobias Bönner <tobi@boenner.family>

Namespace

Symfony\Component\Serializer\Attribute

Code

public function __construct(string $serializedPath) {
    try {
        $this->serializedPath = new PropertyPath($serializedPath);
    } catch (InvalidPropertyPathException $pathException) {
        throw new InvalidArgumentException(\sprintf('Parameter given to "%s" must be a valid property path.', self::class));
    }
}

API Navigation

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