Jafix

Person.php (Model)

Mar 8th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.19 KB | None | 0 0
  1. <?php
  2. namespace Jpg\Events\Domain\Model;
  3.  
  4. /*                                                                        *
  5.  * This script belongs to the TYPO3 Flow package "Jpg.Events".           *
  6.  *                                                                        *
  7.  *                                                                        */
  8.  
  9. use TYPO3\Flow\Annotations as Flow;
  10. use Doctrine\ORM\Mapping as ORM;
  11.  
  12. /**
  13.  * A Person
  14.  *
  15.  * @Flow\Entity
  16.  */
  17. class Person {
  18.  
  19.     /**
  20.      * The name
  21.      * @var string
  22.      */
  23.     protected $name;
  24.  
  25.     /**
  26.     * The events the person is attending
  27.     * @var \Doctrine\Common\Collections\Collection<\Jpg\Events\Domain\Model\Event>
  28.     * @ORM\ManyToMany(mappedBy="persons")
  29.     */
  30.     protected $events;
  31.  
  32.  
  33.     /**
  34.      * Constructs this tag
  35.      */
  36.     public function __construct() {
  37.         $this->events = new \Doctrine\Common\Collections\ArrayCollection();
  38.     }
  39.  
  40.     /**
  41.      * Get the Person's name
  42.      *
  43.      * @return string The Person's name
  44.      */
  45.     public function getName() {
  46.         return $this->name;
  47.     }
  48.  
  49.     /**
  50.      * Sets this Person's name
  51.      *
  52.      * @param string $name The Person's name
  53.      * @return void
  54.      */
  55.     public function setName($name) {
  56.         $this->name = $name;
  57.     }
  58.  
  59. }
  60. ?>
Advertisement
Add Comment
Please, Sign In to add comment