芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/bit-alphas-ltd.com/user/project/vendor/vonage/client-core/src/Call/Endpoint.php
id = $id; $this->type = $type; $this->additional = $additional; } public function getType(): string { return $this->type; } public function getId(): ?string { return $this->id; } public function set($property, $value): self { $this->additional[$property] = $value; return $this; } public function get($property) { return $this->additional[$property] ?? null; } public function getNumber(): ?string { if (!self::PHONE === $this->type) { throw new RuntimeException('number not defined for this type'); } return $this->getId(); } public function __toString(): string { return (string)$this->getId(); } public function jsonSerialize(): ?array { if ($this->type === 'phone') { return array_merge( $this->additional, [ 'type' => $this->type, 'number' => $this->id ] ); } throw new RuntimeException('unknown type: ' . $this->type); } }