текст
ExampleApi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
namespace App\Api\Procedures;
use Ufo\JsonRpcBundle\ApiMethod\Interfaces\IRpcService;
class ExampleApi implements IRpcService
{
public function __construct(
// connecting some dependencies to retrieve data
) {}
public function getUserNameByUuid(string $userId): string
{
// some logic get user info by id
return 'some result';
}
public function sendEmail(string $email, string $subject, string $text): bool
{
// some logic send email
return true;
}
}
namespace App\Api\Procedures;
use Ufo\JsonRpcBundle\ApiMethod\Interfaces\IRpcService;
class ExampleApi implements IRpcService
{
public function __construct(
// connecting some dependencies to retrieve data
) {}
public function getUserNameByUuid(string $userId): string
{
// some logic get user info by id
return 'some result';
}
public function sendEmail(string $email, string $subject, string $text): bool
{
// some logic send email
return true;
}
}