D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
local
/
psa
/
admin
/
plib
/
modules
/
rest-api
/
v2
/
externals
/
Handler
/
Filename :
DomainsIdClient.php
back
Copy
<?php // Copyright 1999-2024. WebPros International GmbH. All rights reserved. namespace PleskExt\RestApi\v2\Handler; use PleskExt\RestApi\v2\Annotation\Producer; use PleskExt\RestApi\v2\Helper\InvokableHandler; use PleskExt\RestApi\v2\Mapper\Client as ClientMapper; use PleskExt\RestApi\v2\SDK; use PleskRestApi\Slim\Psr7\Request; use PleskRestApi\Slim\Psr7\Response; class DomainsIdClient extends InvokableHandler { /** * @Producer(mapper=ClientMapper::class) */ protected function get(Request $request, Response $response) { $domain = SDK\pm_Domain::getByDomainId($request->getAttribute('id')); $response->getBody()->write($this->produce($domain->getClient())); return $response; } }