Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
psa
/
admin
/
plib
/
modules
/
rest-api
/
vendor
/
jms
/
serializer
/
src
/
Naming
/
File Content:
SerializedNameAnnotationStrategy.php
<?php declare (strict_types=1); namespace PleskRestApi\JMS\Serializer\Naming; use PleskRestApi\JMS\Serializer\Metadata\PropertyMetadata; /** * Naming strategy which uses an annotation to translate the property name. * * @author Johannes M. Schmitt <schmittjoh@gmail.com> */ final class SerializedNameAnnotationStrategy implements PropertyNamingStrategyInterface { /** * @var PropertyNamingStrategyInterface */ private $delegate; public function __construct(PropertyNamingStrategyInterface $namingStrategy) { $this->delegate = $namingStrategy; } public function translateName(PropertyMetadata $property) : string { if (null !== ($name = $property->serializedName)) { return $name; } return $this->delegate->translateName($property); } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
CamelCaseNamingStrategy.php
930 bytes
0644
IdenticalPropertyNamingStrategy.php
345 bytes
0644
PropertyNamingStrategyInterface.php
546 bytes
0644
SerializedNameAnnotationStrategy.php
828 bytes
0644
N4ST4R_ID | Naxtarrr