Laravel AT Protocol Client (alpha & unstable)
at main 54 lines 1.2 kB view raw
1<?php 2 3namespace SocialDept\AtpClient\Client; 4 5use SocialDept\AtpClient\AtpClient; 6use SocialDept\AtpClient\Client\Requests\Ozone; 7use SocialDept\AtpClient\Concerns\HasDomainExtensions; 8 9class OzoneClient 10{ 11 use HasDomainExtensions; 12 /** 13 * The parent AtpClient instance 14 */ 15 protected AtpClient $atp; 16 17 /** 18 * Moderation operations (tools.ozone.moderation.*) 19 */ 20 public Ozone\ModerationRequestClient $moderation; 21 22 /** 23 * Server operations (tools.ozone.server.*) 24 */ 25 public Ozone\ServerRequestClient $server; 26 27 /** 28 * Team operations (tools.ozone.team.*) 29 */ 30 public Ozone\TeamRequestClient $team; 31 32 public function __construct(AtpClient $parent) 33 { 34 $this->atp = $parent; 35 $this->moderation = new Ozone\ModerationRequestClient($this); 36 $this->server = new Ozone\ServerRequestClient($this); 37 $this->team = new Ozone\TeamRequestClient($this); 38 } 39 40 protected function getDomainName(): string 41 { 42 return 'ozone'; 43 } 44 45 protected function getRootClientClass(): string 46 { 47 return AtpClient::class; 48 } 49 50 public function root(): AtpClient 51 { 52 return $this->atp; 53 } 54}