| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?php
- namespace ModulesGarden\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Models;
- use ModulesGarden\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Interfaces\AbstractModel;
- /**
- *
- * Created by PhpStorm.
- * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
- * Date: 09.09.19
- * Time: 15:20
- * Class Domain
- */
- class Domain extends AbstractModel
- {
- const ATTR_ALIAS_TARGET_ID = 'kerioDomainAliasTargetId';
- const ATTR_ALIAS_CATCHALL = 'kerioMailCatchAllForwardingAddress';
- const ATTR_DOMAIN_TYPE = 'kerioDomainType';
- const ATTR_DESCRIPTION = 'description';
- const ATTR_DOMAIN_STATUS = 'kerioDomainStatus';
- const ATTR_MAIL_STATUS = 'kerioMailStatus';
- const ATTR_MAIL_DOMAIN_QUOTA = 'kerioMailDomainQuota';
- const TYPE_ALIAS = 'alias';
- protected $id;
- protected $name;
- protected $attrs;
- /**
- * @return mixed
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * @param mixed $name
- */
- public function setName($name)
- {
- $this->name = $name;
- }
- /**
- * @return mixed
- */
- public function getAttrs()
- {
- return $this->attrs;
- }
- /**
- * @param mixed $attrs
- */
- public function setAttrs($attrs)
- {
- $this->attrs = $attrs;
- }
- /**
- * @param $key
- * @param null $value
- */
- public function setAttr($key, $value = null)
- {
- $this->attrs[$key] = $value;
- }
- /**
- * @param $key
- * @return mixed
- */
- public function getAttr($key)
- {
- return $this->attrs[$key];
- }
- /**
- * @return mixed
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * @param mixed $id
- */
- public function setId($id)
- {
- $this->id = $id;
- }
- /**
- * @param $attrs
- */
- public function setA($attrs)
- {
- foreach($attrs as $attr)
- {
- $this->setAttr($attr['N'], $attr['DATA']);
- }
- }
- /**
- * @return bool
- */
- public function isAlias()
- {
- $targetId = $this->getAttr(self::ATTR_ALIAS_TARGET_ID);
- return $targetId ? true : false;
- }
- }
|