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\AttributeView 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 |