class ScalarDummy in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/serializer/Tests/Fixtures/ScalarDummy.php \Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy
Hierarchy
- class \Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy implements DenormalizableInterface, NormalizableInterface
Expanded class hierarchy of ScalarDummy
2 files declare their use of ScalarDummy
- CustomNormalizerTest.php in vendor/
symfony/ serializer/ Tests/ Normalizer/ CustomNormalizerTest.php - XmlEncoderTest.php in vendor/
symfony/ serializer/ Tests/ Encoder/ XmlEncoderTest.php
File
- vendor/
symfony/ serializer/ Tests/ Fixtures/ ScalarDummy.php, line 19
Namespace
Symfony\Component\Serializer\Tests\FixturesView source
class ScalarDummy implements NormalizableInterface, DenormalizableInterface {
public $foo;
public $xmlFoo;
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) {
return $format === 'xml' ? $this->xmlFoo : $this->foo;
}
public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) {
if ($format === 'xml') {
$this->xmlFoo = $data;
}
else {
$this->foo = $data;
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ScalarDummy:: |
public | property | ||
ScalarDummy:: |
public | property | ||
ScalarDummy:: |
public | function |
Denormalizes the object back from an array of scalars|arrays. Overrides DenormalizableInterface:: |
|
ScalarDummy:: |
public | function |
Normalizes the object into an array of scalars|arrays. Overrides NormalizableInterface:: |