|
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\SCO; |
|
8
|
|
|
use Soheilrt\AdobeConnectClient\Client\Exceptions\InvalidException; |
|
9
|
|
|
use Soheilrt\AdobeConnectClient\Client\Exceptions\NoAccessException; |
|
10
|
|
|
use Soheilrt\AdobeConnectClient\Client\Exceptions\NoDataException; |
|
11
|
|
|
use Soheilrt\AdobeConnectClient\Client\Exceptions\TooMuchDataException; |
|
12
|
|
|
use Soheilrt\AdobeConnectClient\Client\Helpers\SetEntityAttributes as FillObject; |
|
13
|
|
|
use Soheilrt\AdobeConnectClient\Client\Helpers\StatusValidate; |
|
14
|
|
|
|
|
15
|
|
|
class ScoShortcuts extends Command |
|
16
|
|
|
{ |
|
17
|
|
|
/** |
|
18
|
|
|
* Request Parameters. |
|
19
|
|
|
* |
|
20
|
|
|
* @var array |
|
21
|
|
|
*/ |
|
22
|
|
|
protected $parameters = ['action' => 'sco-shortcuts']; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @var SCO|mixed |
|
26
|
|
|
*/ |
|
27
|
|
|
protected $sco; |
|
28
|
|
|
|
|
29
|
|
|
|
|
30
|
|
|
public function __construct() |
|
31
|
|
|
{ |
|
32
|
|
|
$this->sco = $this->getEntity('sco'); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* Process the command and return a value. |
|
37
|
|
|
* |
|
38
|
|
|
* @throws NoAccessException |
|
39
|
|
|
* @throws NoDataException |
|
40
|
|
|
* @throws TooMuchDataException |
|
41
|
|
|
* |
|
42
|
|
|
* @throws InvalidException |
|
43
|
|
|
* @return SCO[] |
|
44
|
|
|
*/ |
|
45
|
|
|
protected function process() |
|
46
|
|
|
{ |
|
47
|
|
|
$response = Converter::convert( |
|
48
|
|
|
$this->client->doGet( |
|
|
|
|
|
|
49
|
|
|
$this->parameters + ['session' => $this->client->getSession()] |
|
|
|
|
|
|
50
|
|
|
) |
|
51
|
|
|
); |
|
52
|
|
|
|
|
53
|
|
|
StatusValidate::validate($response['status']); |
|
54
|
|
|
|
|
55
|
|
|
$shorcuts = []; |
|
56
|
|
|
foreach ($response['shortcuts'] as $shortcut) { |
|
57
|
|
|
$sco = new $this->sco(); |
|
58
|
|
|
FillObject::setAttributes($sco, $shortcut); |
|
59
|
|
|
$shorcuts[$sco->type] = $sco; |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
return $shorcuts; |
|
63
|
|
|
} |
|
64
|
|
|
} |
|
65
|
|
|
|
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.