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

Breadcrumb

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

class SerializedPath

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

Hierarchy

  • class \Symfony\Component\Serializer\Attribute\SerializedPath

Expanded class hierarchy of SerializedPath

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

File

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

Namespace

Symfony\Component\Serializer\Attribute
View source
class SerializedPath {
    private PropertyPath $serializedPath;
    
    /**
     * @param string $serializedPath A path using a valid PropertyAccess syntax where the value is stored in a normalized representation
     */
    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));
        }
    }
    public function getSerializedPath() : PropertyPath {
        return $this->serializedPath;
    }

}

Members

Title Sort descending Modifiers Object type Summary
SerializedPath::$serializedPath private property
SerializedPath::getSerializedPath public function
SerializedPath::__construct public function
RSS feed
Powered by Drupal