Explorer
home
/
zoteqbgb
/
public_html
/
vendor
/
vonage
/
client-core
/
src
/
Secrets
Location:
/home/zoteqbgb/public_html/vendor/vonage/client-core/src/Secrets
Root path:
/home/zoteqbgb/public_html/config/676626
Editing: Client.php
<?php namespace Vonage\Secrets; use Vonage\Client\APIClient; use Vonage\Client\APIResource; use Vonage\Entity\Hydrator\ArrayHydrator; use Vonage\Entity\IterableAPICollection; class Client implements APIClient { public function __construct(protected APIResource $api) { } public function getAPIResource(): APIResource { return $this->api; } public function get(string $accountId, string $id): Secret { $data = $this->api->get("{$accountId}/secrets/{$id}"); return new Secret($data); } public function list(string $accountId): IterableAPICollection { $collection = $this->api->search(null, "/accounts/{$accountId}/secrets"); $hydrator = new ArrayHydrator(); $hydrator->setPrototype(new Secret()); $collection->setHydrator($hydrator); return $collection; } public function create(string $accountId, string $secret): Secret { $response = $this->api->create(['secret' => $secret], "/{$accountId}/secrets"); return new Secret($response); } public function revoke(string $accountId, string $id) { $this->api->delete("{$accountId}/secrets/{$id}"); } }
Save maftirs
Upload
Start Upload
New File
Create File
New Folder
Create Folder
Directory Contents
Name
Size
Perms
Modified
Actions
Client.php
1,214 bytes
0644
2023-10-02 14:26
âï¸
ðï¸
Rename
ClientFactory.php
762 bytes
0644
2023-10-02 14:26
âï¸
ðï¸
Rename
Secret.php
963 bytes
0644
2023-10-02 14:26
âï¸
ðï¸
Rename
Chang
Apply