partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

BaseEntity.php (584B)


      1 <?php
      2 
      3 namespace PartKeepr\CoreBundle\Entity;
      4 
      5 use Doctrine\ORM\Mapping as ORM;
      6 
      7 /** @ORM\MappedSuperclass */
      8 abstract class BaseEntity
      9 {
     10     /**
     11      * @ORM\Id
     12      * @ORM\Column(type="integer")
     13      * @ORM\GeneratedValue(strategy="AUTO")
     14      *
     15      * @var int
     16      */
     17     private $id;
     18 
     19     /**
     20      * Returns the ID of this object.
     21      *
     22      * @param none
     23      *
     24      * @return int The ID of this object
     25      */
     26     public function getId()
     27     {
     28         return $this->id;
     29     }
     30 
     31     public function __toString()
     32     {
     33         return get_class($this)." #".$this->getId();
     34     }
     35 }