Advertisement
Puzo

Doctrine 2: Season entity

Jan 9th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2. namespace Entities;
  3.  
  4. /**
  5.  * @Entity
  6.  * @Table(name="season")
  7.  */
  8. class Season {
  9.     /**
  10.      * @Id
  11.      * @Column(type="integer", nullable=false)
  12.      * @GeneratedValue(strategy="AUTO")
  13.      */
  14.     protected $id;
  15.      
  16.     /**
  17.      * @Column(type="string", length="255", nullable=false)
  18.      */
  19.     protected $title;
  20.    
  21.     /**
  22.      * @OneToOne(targetEntity="Matches", mappedBy="season_id")
  23.      */
  24.     protected $match;
  25.    
  26.    
  27.     // GETTERS & SETTERS
  28.     public function setTitle($title) {
  29.         $this->title = (string)$title;
  30.     }
  31.      
  32.     public function getTitle() {
  33.         return $this->title;
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement