src/Entity/UrlRedirect.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  4. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  5. use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
  6. use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
  7. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  8. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use Doctrine\Common\Collections\Collection;
  11. use Doctrine\ORM\Mapping as ORM;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. use Symfony\Component\HttpFoundation\File\UploadedFile;
  14. use Symfony\Component\HttpFoundation\File\File;
  15. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  16. /**
  17.  * @ORM\Entity
  18.  * @ORM\Table(name="url_redirect")
  19.  */
  20. class UrlRedirect implements BlameableInterfaceTimestampableInterface  {
  21.     use BlameableTrait;
  22.     use TimestampableTrait;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Column(name="from_url", type="text", nullable=true)
  27.      */
  28.     private $from;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="to_url", type="text", nullable=true)
  33.      */
  34.     private $to;
  35.     
  36.     /**
  37.      * @ORM\Id
  38.      * @ORM\Column(type="integer")
  39.      * @ORM\GeneratedValue(strategy="AUTO")
  40.      */
  41.     protected $id;
  42.     public function getId()
  43.     {
  44.         return $this->id;
  45.     }
  46.     /**
  47.      * @return string
  48.      */
  49.     public function getFrom(): ?string
  50.     {
  51.         return $this->from;
  52.     }
  53.     /**
  54.      * @param string $from
  55.      */
  56.     public function setFrom(string $from): void
  57.     {
  58.         $this->from $from;
  59.     }
  60.     /**
  61.      * @return string
  62.      */
  63.     public function getTo(): ?string
  64.     {
  65.         return $this->to;
  66.     }
  67.     /**
  68.      * @param string $to
  69.      */
  70.     public function setTo(string $to): void
  71.     {
  72.         $this->to $to;
  73.     }
  74. }