1 | <?php |
||||
2 | |||||
3 | namespace Soheilrt\AdobeConnectClient\Client\Commands; |
||||
4 | |||||
5 | use Soheilrt\AdobeConnectClient\Client\Abstracts\Command; |
||||
6 | use Soheilrt\AdobeConnectClient\Client\Converter\Converter; |
||||
7 | use Soheilrt\AdobeConnectClient\Client\Entities\Permission; |
||||
8 | use Soheilrt\AdobeConnectClient\Client\Helpers\SetEntityAttributes as FillObject; |
||||
9 | use Soheilrt\AdobeConnectClient\Client\Helpers\StatusValidate; |
||||
10 | |||||
11 | /** |
||||
12 | * Get the Principal's permission in a SCO, Principal or Account. |
||||
13 | * |
||||
14 | * More info see {@link https://helpx.adobe.com/adobe-connect/webservices/permissions-info.html} |
||||
15 | */ |
||||
16 | class PermissionInfoFromPrincipal extends Command |
||||
17 | { |
||||
18 | /** |
||||
19 | * @var int |
||||
20 | */ |
||||
21 | protected $aclId; |
||||
22 | |||||
23 | /** |
||||
24 | * @var int |
||||
25 | */ |
||||
26 | protected $principalId; |
||||
27 | |||||
28 | /** |
||||
29 | * @var Permission|mixed |
||||
30 | */ |
||||
31 | protected $permission; |
||||
32 | |||||
33 | /** |
||||
34 | * @param int $aclId |
||||
35 | * @param int $principalId |
||||
36 | */ |
||||
37 | public function __construct($aclId, $principalId) |
||||
38 | { |
||||
39 | $this->aclId = (int) $aclId; |
||||
40 | $this->principalId = (int) $principalId; |
||||
41 | $this->permission = $this->getEntity('permission'); |
||||
42 | } |
||||
43 | |||||
44 | /** |
||||
45 | * {@inheritdoc} |
||||
46 | * |
||||
47 | * @return Permission |
||||
48 | */ |
||||
49 | protected function process() |
||||
50 | { |
||||
51 | $response = Converter::convert( |
||||
52 | $this->client->doGet([ |
||||
0 ignored issues
–
show
|
|||||
53 | 'action' => 'permissions-info', |
||||
54 | 'acl-id' => $this->aclId, |
||||
55 | 'principal-id' => $this->principalId, |
||||
56 | 'session' => $this->client->getSession(), |
||||
0 ignored issues
–
show
The method
getSession() does not exist on Soheilrt\AdobeConnectCli...lient\Abstracts\Command .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||
57 | ]) |
||||
58 | ); |
||||
59 | StatusValidate::validate($response['status']); |
||||
60 | $permission = new $this->permission(); |
||||
61 | FillObject::setAttributes($permission, $response['permission']); |
||||
62 | |||||
63 | return $permission; |
||||
64 | } |
||||
65 | } |
||||
66 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.