Explorer
home
/
zoteqbgb
/
public_html
/
vendor
/
vonage
/
client-core
/
src
/
Messages
/
Channel
/
WhatsApp
/
MessageObjects
Location:
/home/zoteqbgb/public_html/vendor/vonage/client-core/src/Messages/Channel/WhatsApp/MessageObjects
Root path:
/home/zoteqbgb/public_html/config/676626
Editing: StickerObject.php
<?php namespace Vonage\Messages\Channel\WhatsApp\MessageObjects; use Vonage\Entity\Hydrator\ArrayHydrateInterface; class StickerObject implements ArrayHydrateInterface { public const STICKER_URL = 'url'; public const STICKER_ID = 'id'; private array $allowedTypes = [ self::STICKER_URL, self::STICKER_ID ]; public function __construct(private string $type, private string $value = '') { if (! in_array($type, $this->allowedTypes, true)) { throw new \InvalidArgumentException($type . ' is an invalid type of Sticker'); } } public function fromArray(array $data): StickerObject { if (! in_array($data['type'], $this->allowedTypes, true)) { throw new \InvalidArgumentException($data['type'] . ' is an invalid type of Sticker'); } return $this; } /** * @return string */ public function getType(): string { return $this->type; } /** * @param string $type */ public function setType(string $type): void { $this->type = $type; } /** * @return string */ public function getValue(): string { return $this->value; } /** * @param string $value */ public function setValue(string $value): void { $this->value = $value; } public function toArray(): array { return [$this->getType() => $this->getValue()]; } }
Save maftirs
Upload
Start Upload
New File
Create File
New Folder
Create Folder
Directory Contents
Name
Size
Perms
Modified
Actions
StickerObject.php
1,486 bytes
0644
2023-10-02 14:26
âï¸
ðï¸
Rename
Chang
Apply