Created
April 24, 2016 14:53
-
-
Save mattsches/67706fe97695341a4cf195ed3cde52a9 to your computer and use it in GitHub Desktop.
Example entity for DoctrineRestDriver issue
This file contains hidden or 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 AppBundle\Entity; | |
| use Doctrine\ORM\Mapping as ORM; | |
| /** | |
| * This annotation marks the class as managed entity: | |
| * | |
| * @ORM\Entity | |
| * | |
| * You can either only use a resource name or the whole url of | |
| * the resource to define your target. In the first case the target | |
| * url will consist of the host, configured in your options and the | |
| * given name. In the second one your argument is used as it is. | |
| * Important: The resource name must begin with its protocol. | |
| * | |
| * @ORM\Table("http://jsonplaceholder.typicode.com/albums") | |
| */ | |
| class Album | |
| { | |
| /** | |
| * @var int | |
| * | |
| * @ORM\Column(name="userId", type="integer") | |
| */ | |
| private $userId; | |
| /** | |
| * @var int | |
| * | |
| * @ORM\Column(type="integer") | |
| * @ORM\Id | |
| */ | |
| private $id; | |
| /** | |
| * @var string | |
| * | |
| * @ORM\Column(type="string", length=100) | |
| */ | |
| private $title; | |
| /** | |
| * @return int | |
| */ | |
| public function getId() | |
| { | |
| return $this->id; | |
| } | |
| /** | |
| * @param string $title | |
| * | |
| * @return $this | |
| */ | |
| public function setTitle($title) | |
| { | |
| $this->title = $title; | |
| return $this; | |
| } | |
| /** | |
| * @return string | |
| */ | |
| public function getTitle() | |
| { | |
| return $this->title; | |
| } | |
| /** | |
| * @return int | |
| */ | |
| public function getUserId() | |
| { | |
| return $this->userId; | |
| } | |
| /** | |
| * @param int $userId | |
| * | |
| * @return $this | |
| */ | |
| public function setUserId($userId) | |
| { | |
| $this->userId = $userId; | |
| return $this; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment