| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace ModulesGarden\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Repository;
- use ModulesGarden\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Interfaces\AbstractApiClient;
- use ModulesGarden\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Interfaces\AbstractRepository;
- use ModulesGarden\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Models\ClassOfService as CosModel;
- /**
- *
- * Created by PhpStorm.
- * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
- * Date: 29.08.19
- * Time: 08:27
- * Class ClassOfServices
- */
- class ClassOfServices extends AbstractRepository
- {
- const CUSTOM_ZIMBRA = 'customMGkerio';
- const ZIMBRA_CONFIG_OPTIONS = 'kerioConfigurableOptions';
- const CLASS_OF_SERVICE_QUOTA = 'cosQuota';
- public function all()
- {
- $result = $this->getClient()->classOfServices->getAllCos();
- foreach ($result as $item)
- {
- $cos = new CosModel($item);
- $tmp[$cos->getId()] = $cos;
- }
- return $tmp;
- }
- public function asArrayList()
- {
- $result = $this->getClient()->classOfServices->getAllCos();
- foreach ($result as $item)
- {
- $tmp[] = $item['NAME'];
- }
- return $tmp;
- }
- public function byName($name)
- {
- //todo add support
- }
- public function byId($id)
- {
- //todo add support
- }
- }
|