| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <?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: 10.09.19
- * Time: 08:43
- * Class Account
- */
- class Account extends AbstractModel
- {
- /**
- * Account Attributes
- */
- const ATTR_FIRSTNAME = 'givenName';
- const ATTR_LASTNAME = 'sn';
- const ATTR_PHONE = 'telephoneNumber';
- const ATTR_MOBILE_PHONE = 'mobile';
- const ATTR_FAX = 'facsimileTelephoneNumber';
- const ATTR_PAGER = 'pager';
- const ATTR_HOME_PHONE = 'homePhone';
- const ATTR_COUNTRY = 'co';
- const ATTR_STATE = 'st';
- const ATTR_POSTAL_CODE = 'postalCode';
- const ATTR_CITY = 'l';
- const ATTR_STREET = 'street';
- const ATTR_COMPANY = 'company';
- const ATTR_PROF_TITLE = 'title';
- const ATTR_ACCOUNT_STATUS = 'kerioAccountStatus';
- const ATTR_DISPLAY_NAME = 'displayName';
- const ATTR_MAIL_QUOTA = 'kerioMailQuota';
- const ATTR_ALIAS = 'kerioMailAlias';
- const ATTR_CLASS_OF_SERVICE_ID = 'kerioCOSId';
- protected $id;
- protected $name;
- protected $password;
- protected $attrs;
- protected $limit;
- protected $used;
- /**
- * @return mixed
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * @param $name
- * @return $this
- */
- public function setName($name)
- {
- $this->name = $name;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getPassword()
- {
- return $this->password;
- }
- /**
- * @param $password
- * @return $this
- */
- public function setPassword($password)
- {
- $this->password = $password;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * @param $id
- * @return $this
- */
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getLimit()
- {
- return $this->limit;
- }
- /**
- * @param $limit
- * @return $this
- */
- public function setLimit($limit = 0)
- {
- $this->limit = $limit;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getUsed()
- {
- return $this->used;
- }
- /**
- * @param $used
- * @return $this
- */
- public function setUsed($used = 0)
- {
- $this->used = $used;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getAttrs()
- {
- return $this->attrs;
- }
- /**
- * @param $key
- * @param null $value
- * @return $this
- */
- public function setAttr($key, $value = null)
- {
- $this->attrs[$key] = $value;
- return $this;
- }
- /**
- * @param $key
- * @return mixed
- */
- public function getAttr($key)
- {
- return $this->attrs[$key];
- }
- /**
- * @param $attrs
- * @return $this
- */
- public function setAttrs($attrs = [])
- {
- $this->attrs = $attrs;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getCosId()
- {
- return $this->getDataResourceA(self::ATTR_CLASS_OF_SERVICE_ID);
- }
- /**
- * @return mixed
- */
- public function getAliases()
- {
- foreach($this->resources['a'] as $res)
- {
- if($res['N'] === self::ATTR_ALIAS)
- {
- $tmp[$res['DATA']] = $res['DATA'];
- }
- }
- return $tmp;
- }
- }
|