src/Entity/Configuracion.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Configuracion
  6.  *
  7.  * @ORM\Table(name="configuracion")
  8.  * @ORM\HasLifecycleCallbacks()
  9.  * @ORM\Entity
  10.  */
  11. class Configuracion
  12. {
  13.     use Timestamp;
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="integer", length=255)
  22.      */
  23.     private $linkdepago_timeout 5;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $mail;
  28.     /**
  29.      * @ORM\Column(type="string", length=255)
  30.      */
  31.     private $mail_host;
  32.     /**
  33.      * @ORM\Column(type="integer", length=255)
  34.      */
  35.     private $mail_puerto;
  36.     /**
  37.      * @ORM\Column(type="string", length=255)
  38.      */
  39.     private $mail_usuario;
  40.     /**
  41.      * @ORM\Column(type="string", length=255)
  42.      */
  43.     private $mail_pass;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getLinkdepagoTimeout(): ?int
  49.     {
  50.         return $this->linkdepago_timeout;
  51.     }
  52.     public function setLinkdepagoTimeout(int $linkdepago_timeout): static
  53.     {
  54.         $this->linkdepago_timeout $linkdepago_timeout;
  55.         return $this;
  56.     }
  57.     public function getMail(): ?string
  58.     {
  59.         return $this->mail;
  60.     }
  61.     private function setMail(string $mail): self
  62.     {
  63.         $this->mail $mail;
  64.         return $this;
  65.     }
  66.     public function getMailHost(): ?string
  67.     {
  68.         return $this->mail_host;
  69.     }
  70.     public function setMailHost(string $mail_host): static
  71.     {
  72.         $this->mail_host $mail_host;
  73.         return $this;
  74.     }
  75.     public function getMailPuerto(): ?int
  76.     {
  77.         return $this->mail_puerto;
  78.     }
  79.     public function setMailPuerto(int $mail_puerto): static
  80.     {
  81.         $this->mail_puerto $mail_puerto;
  82.         return $this;
  83.     }
  84.     public function getMailUsuario(): ?string
  85.     {
  86.         return $this->mail_usuario;
  87.     }
  88.     public function setMailUsuario(string $mail_usuario): static
  89.     {
  90.         $this->mail_usuario $mail_usuario;
  91.         $this->setMail($mail_usuario);
  92.         return $this;
  93.     }
  94.     public function getMailPass(): ?string
  95.     {
  96.         return $this->mail_pass;
  97.     }
  98.     // public function setMailPass(string $mail_pass): static
  99.     // {
  100.     //     $this->mail_pass = $mail_pass;
  101.     //     return $this;
  102.     // }
  103.     public function setMailPass(?string $mail_pass): static
  104.     {
  105.         if (!empty($mail_pass)) {
  106.             // Aquí deberías añadir tu lógica de encriptación de la contraseña
  107.             // Por ejemplo, si estás utilizando algún servicio o librería para encriptar
  108.             $this->mail_pass $mail_pass// Asumiendo encriptación directa por simplicidad
  109.         }
  110.         return $this;
  111.     }
  112. }