From 3c09b4038d7ee5ac28922471cb2c8b1537b303df Mon Sep 17 00:00:00 2001 From: tracer Date: Wed, 21 Sep 2022 16:02:42 +0200 Subject: [PATCH] added encryption support --- src/Entity/Panel.php | 263 +++++++++++++++++++++++-------------------- 1 file changed, 141 insertions(+), 122 deletions(-) diff --git a/src/Entity/Panel.php b/src/Entity/Panel.php index 6c84f8e..5bc70e4 100644 --- a/src/Entity/Panel.php +++ b/src/Entity/Panel.php @@ -7,128 +7,147 @@ namespace App\Entity; */ class Panel { - private int $id; - private String $name; - private String $a; - private String $aaaa; - private String $apikey; - private int $self; - - /** - * @param String $name - * @param int $id - * @param String $a - * @param String $aaaa - * @param String $apikey - * @param int $self - */ - public function __construct(String $name, int $id = 0, String $a = '', String $aaaa = '', String $apikey = '', int $self = 0) - { - $this->id = $id; - $this->name = $name; - $this->a = $a; - $this->aaaa = $aaaa; - $this->apikey = $apikey; - $this->self = $self; - } - - /** - * @return int - */ - public function getSelf(): int - { - return $this->self; - } - - /** - * @param int $self - */ - public function setSelf(int $self): void - { - $this->self = $self; - } - - - /** - * @return String - */ - public function getA(): string - { - return $this->a; - } - - /** - * @return String - */ - public function getAaaa(): string - { - return $this->aaaa; - } - - /** - * @return String - */ - public function getApikey(): string - { + /** + * @param string $name + * @param int $id + * @param string $a + * @param string $aaaa + * @param string $apikey + * @param string $apikeyPrefix + * @param string $self + */ + public function __construct( + + private string $name, + private int $id = 0, + private string $a = '', + private string $aaaa = '', + private string $apikey = '', + private string $apikeyPrefix = '', + private string $self = 'no', + ) + {} + + + + /** + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * @param string $name + */ + public function setName(string $name): void + { + $this->name = $name; + } + + /** + * @return int + */ + public function getId(): int + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId(int $id): void + { + $this->id = $id; + } + + /** + * @return string + */ + public function getA(): string + { + return $this->a; + } + + + /** + * @return string + */ + public function getSelf(): string + { + return $this->self; + } + + /** + * @param string $self + */ + public function setSelf(string $self): void + { + $this->self = $self; + } + + + + /** + * @return string + */ + public function getAaaa(): string + { + return $this->aaaa; + } + + /** + * @return string + */ + public function getApikey(): string + { return $this->apikey; } - - /** - * @return int - */ - public function getId(): int - { - return $this->id; - } - - /** - * @param int $id - */ - public function setId(int $id): void - { - $this->id = $id; - } - - /** - * @return String - */ - public function getName(): string - { - return $this->name; - } - - - /** - * @param String $apikey - */ - public function setApikey(string $apikey): void - { - $this->apikey = $apikey; - } - - - /** - * @param String $name - */ - public function setName(string $name): void - { - $this->name = $name; - } - - /** - * @param String $a - */ - public function setA(string $a): void - { - $this->a = $a; - } - - /** - * @param String $aaaa - */ - public function setAaaa(string $aaaa): void - { - $this->aaaa = $aaaa; - } - + + + + /** + * @param string $apikey + */ + public function setApikey(string $apikey): void + { + $this->apikey = $apikey; + } + + + + /** + * @param string $a + */ + public function setA(string $a): void + { + $this->a = $a; + } + + /** + * @param string $aaaa + */ + public function setAaaa(string $aaaa): void + { + $this->aaaa = $aaaa; + } + + + /** + * @return string + */ + public function getApikeyPrefix(): string + { + return $this->apikeyPrefix; + } + + /** + * @param string $apikeyPrefix + */ + public function setApikeyPrefix(string $apikeyPrefix): void + { + $this->apikeyPrefix = $apikeyPrefix; + } + }