protected function JsonEncoderTest::getObject in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/serializer/Tests/Encoder/JsonEncoderTest.php \Symfony\Component\Serializer\Tests\Encoder\JsonEncoderTest::getObject()
1 call to JsonEncoderTest::getObject()
- JsonEncoderTest::testComplexObject in vendor/
symfony/ serializer/ Tests/ Encoder/ JsonEncoderTest.php
File
- vendor/
symfony/ serializer/ Tests/ Encoder/ JsonEncoderTest.php, line 69
Class
Namespace
Symfony\Component\Serializer\Tests\EncoderCode
protected function getObject() {
$obj = new \stdClass();
$obj->foo = 'foo';
$obj->bar = array(
'a',
'b',
);
$obj->baz = array(
'key' => 'val',
'key2' => 'val',
'A B' => 'bar',
'item' => array(
array(
'title' => 'title1',
),
array(
'title' => 'title2',
),
),
'Barry' => array(
'FooBar' => array(
'Baz' => 'Ed',
'@id' => 1,
),
),
);
$obj->qux = '1';
return $obj;
}