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

Breadcrumb

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

class SerializedName

@author Fabien Bourigault <bourigaultfabien@gmail.com>

Hierarchy

  • class \Symfony\Component\Serializer\Attribute\SerializedName

Expanded class hierarchy of SerializedName

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

File

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

Namespace

Symfony\Component\Serializer\Attribute
View source
class SerializedName {
    
    /**
     * @param string $serializedName The name of the property as it will be serialized
     */
    public function __construct(string $serializedName) {
        if ('' === $serializedName) {
            throw new InvalidArgumentException(\sprintf('Parameter given to "%s" must be a non-empty string.', self::class));
        }
    }
    public function getSerializedName() : string {
        return $this->serializedName;
    }

}

Members

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