Overview

Namespaces

  • Crunchmail
    • Collections
    • Entities
    • Exception
    • PHPUnit
    • Resources

Classes

  • Crunchmail\Client
  • Crunchmail\Collections\GenericCollection
  • Crunchmail\Entities\AttachmentEntity
  • Crunchmail\Entities\ContactEntity
  • Crunchmail\Entities\ContactListEntity
  • Crunchmail\Entities\ContactQueueEntity
  • Crunchmail\Entities\DomainEntity
  • Crunchmail\Entities\GenericEntity
  • Crunchmail\Entities\MessageEntity
  • Crunchmail\Entities\RecipientEntity
  • Crunchmail\PHPUnit\IsEntityConstraint
  • Crunchmail\PHPUnit\IsGenericCollectionConstraint
  • Crunchmail\PHPUnit\IsGenericEntityConstraint
  • Crunchmail\PHPUnit\IsGenericResourceConstraint
  • Crunchmail\PHPUnit\IsResourceConstraint
  • Crunchmail\PHPUnit\TestCase
  • Crunchmail\Resources\DomainsResource
  • Crunchmail\Resources\GenericResource
  • Crunchmail\Resources\PreviewSendResource

Exceptions

  • Crunchmail\Exception\ApiException
  • Overview
  • Namespace
  • Class
 1: <?php
 2: /**
 3:  * Domains entity
 4:  *
 5:  * @author    Yannick Huerre <dev@sheoak.fr>
 6:  * @copyright 2015 (c) Oasiswork
 7:  * @license   https://opensource.org/licenses/MIT MIT
 8:  */
 9: namespace Crunchmail\Entities;
10: 
11: /**
12:  * Domains entity class for Crunchmail API
13:  */
14: class DomainEntity extends GenericEntity
15: {
16:     /**
17:      * To string
18:      *
19:      * @return string
20:      */
21:     public function __toString()
22:     {
23:         return $this->name;
24:     }
25: 
26:     /**
27:      * Check mx status
28:      *
29:      * @return boolean
30:      */
31:     public function checkMx()
32:     {
33:         return ('ok' === $this->mx_status);
34:     }
35: 
36:     /**
37:      * Check dkim status
38:      *
39:      * @return boolean
40:      */
41:     public function checkDkim()
42:     {
43:         return ('ok' === $this->dkim_status);
44:     }
45: 
46:     /**
47:      * Check both mx and dkim status
48:      *
49:      * @return boolean
50:      */
51:     public function verify()
52:     {
53:         return $this->checkMx() && $this->checkDkim();
54:     }
55: }
56: 
API documentation generated by ApiGen