-
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: mesilov <[email protected]>
- Loading branch information
Showing
12 changed files
with
286 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/Services/CRM/Common/Result/SystemFields/Types/Email.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Services\CRM\Common\Result\SystemFields\Types; | ||
|
||
use Bitrix24\SDK\Core\Result\AbstractItem; | ||
|
||
/** | ||
* @property-read string $VALUE | ||
* @property-read int $ID | ||
* @property-read PhoneValueType $VALUE_TYPE | ||
*/ | ||
class Email extends AbstractItem | ||
{ | ||
public function __get($offset) | ||
{ | ||
return match ($offset) { | ||
'VALUE' => $this->data[$offset], | ||
'ID' => (int)$this->data['ID'], | ||
'VALUE_TYPE' => EmailValueType::from($this->data['VALUE_TYPE']), | ||
default => parent::__get($offset), | ||
}; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Services/CRM/Common/Result/SystemFields/Types/EmailValueType.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Services\CRM\Common\Result\SystemFields\Types; | ||
|
||
enum EmailValueType: string | ||
{ | ||
case work = 'WORK'; | ||
case home = 'HOME'; | ||
case other = 'OTHER'; | ||
case mailing = 'MAILING'; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/Services/CRM/Common/Result/SystemFields/Types/InstantMessenger.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Services\CRM\Common\Result\SystemFields\Types; | ||
|
||
use Bitrix24\SDK\Core\Result\AbstractItem; | ||
|
||
/** | ||
* @property-read string $VALUE | ||
* @property-read int $ID | ||
* @property-read PhoneValueType $VALUE_TYPE | ||
*/ | ||
class InstantMessenger extends AbstractItem | ||
{ | ||
public function __get($offset) | ||
{ | ||
return match ($offset) { | ||
'VALUE' => $this->data[$offset], | ||
'ID' => (int)$this->data['ID'], | ||
'VALUE_TYPE' => EmailValueType::from($this->data['VALUE_TYPE']), | ||
default => parent::__get($offset), | ||
}; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/Services/CRM/Common/Result/SystemFields/Types/InstantMessengerValueType.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Services\CRM\Common\Result\SystemFields\Types; | ||
|
||
enum InstantMessengerValueType: string | ||
{ | ||
case facebook = 'FACEBOOK'; | ||
case telegram = 'TELEGRAM'; | ||
case vk = 'VK'; | ||
case skype = 'SKYPE'; | ||
case viber = 'VIBER'; | ||
case instagram = 'INSTAGRAM'; | ||
case bitrix24 = 'BITRIX24'; | ||
case openline = 'OPENLINE'; | ||
case imol = 'IMOL'; | ||
case icq = 'ICQ'; | ||
case msn = 'MSN'; | ||
case jabber = 'JABBER'; | ||
case other = 'OTHER'; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/Services/CRM/Common/Result/SystemFields/Types/Website.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Services\CRM\Common\Result\SystemFields\Types; | ||
|
||
use Bitrix24\SDK\Core\Result\AbstractItem; | ||
|
||
/** | ||
* @property-read string $VALUE | ||
* @property-read int $ID | ||
* @property-read PhoneValueType $VALUE_TYPE | ||
*/ | ||
class Website extends AbstractItem | ||
{ | ||
public function __get($offset) | ||
{ | ||
return match ($offset) { | ||
'VALUE' => $this->data[$offset], | ||
'ID' => (int)$this->data['ID'], | ||
'VALUE_TYPE' => EmailValueType::from($this->data['VALUE_TYPE']), | ||
default => parent::__get($offset), | ||
}; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Services/CRM/Common/Result/SystemFields/Types/WebsiteValueType.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Services\CRM\Common\Result\SystemFields\Types; | ||
|
||
enum WebsiteValueType: string | ||
{ | ||
case work = 'WORK'; | ||
case home = 'HOME'; | ||
case facebook = 'FACEBOOK'; | ||
case vk = 'VK'; | ||
case livejournal = 'LIVEJOURNAL'; | ||
case twitter = 'TWITTER'; | ||
case other = 'OTHER'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.