Last active
August 29, 2015 13:57
-
-
Save dadamssg/9478210 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyCompany\MyProject\CoreBundle\Entity\TestObject: | |
exclusion_policy: ALL | |
properties: | |
id: | |
expose: true | |
type: integer | |
string: | |
expose: true | |
createdAt: | |
access_type: public_method | |
accessor: | |
getter: getCreatedAt | |
setter: setCreatedAt | |
expose: true | |
type: DateTime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": 23, | |
"string": "testing..." | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MyCompany\MyProject\CoreBundle\Entity; | |
class TestObject | |
{ | |
protected $id = 23; | |
protected $string = 'testing...'; | |
protected $createdAt; | |
public function __construct() | |
{ | |
return new \DateTime; | |
} | |
public function getCreatedAt() | |
{ | |
return $this->createdAt; | |
} | |
public function setCreatedAt(\DateTime $createdAt) | |
{ | |
$this->createdAt = $createdAt; | |
} | |
public function getId() | |
{ | |
return $this->id; | |
} | |
public function getString() | |
{ | |
return $this->string; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment