![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/rentpix.corals.io/vendor/vonage/client-core/src/Messages/Channel/Viber/ |
<?php namespace Vonage\Messages\Channel\Viber; use Vonage\Messages\MessageObjects\ImageObject; use Vonage\Messages\Channel\BaseMessage; class ViberImage extends BaseMessage { use ViberServiceObjectTrait; protected string $channel = 'viber_service'; protected string $subType = BaseMessage::MESSAGES_SUBTYPE_IMAGE; protected ImageObject $image; public function __construct( string $to, string $from, ImageObject $image, ?string $category = null, ?int $ttl = null, ?string $type = null ) { $this->to = $to; $this->from = $from; $this->image = $image; $this->category = $category; $this->ttl = $ttl; $this->type = $type; } public function toArray(): array { $returnArray = $this->getBaseMessageUniversalOutputArray(); $returnArray['image'] = $this->image->toArray(); if ($this->requiresViberServiceObject()) { $returnArray['viber_service']['category'] = $this->getCategory(); $returnArray['viber_service']['ttl'] = $this->getTtl(); $returnArray['viber_service']['type'] = $this->getType(); } return array_filter($returnArray); } }