| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Services\Create;
- use ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Interfaces\ApiService;
- use ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Models\Domain;
- /**
- *
- * Created by PhpStorm.
- * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
- * Date: 03.10.19
- * Time: 11:04
- * Class CreateDomain
- */
- class CreateDomain extends ApiService
- {
- /**
- * @return mixed|void
- */
- public function process()
- {
- /**
- * prepare model
- */
- $domain = new Domain();
- $domain->setName($this->formData['domain']);
- /**
- * API request
- */
- $result = $this->api->domain->create($domain);
- /**
- * check result
- */
- if(!$result)
- {
- $this->setError($this->api->domain->getError());
- return false;
- }
- return $result;
- }
- }
|