D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
psa
/
admin
/
plib
/
vendor
/
jms
/
serializer
/
src
/
Metadata
/
Filename :
VirtualPropertyMetadata.php
back
Copy
<?php declare(strict_types=1); namespace JMS\Serializer\Metadata; class VirtualPropertyMetadata extends PropertyMetadata { public function __construct(string $class, string $methodName) { if (0 === strpos($methodName, 'get')) { $fieldName = lcfirst(substr($methodName, 3)); } else { $fieldName = $methodName; } $this->class = $class; $this->name = $fieldName; $this->getter = $methodName; $this->readOnly = true; } public function setAccessor(string $type, ?string $getter = null, ?string $setter = null): void { } }