| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Soheilrt\AdobeConnectClient\Client\Commands; |
||||
| 4 | |||||
| 5 | use Soheilrt\AdobeConnectClient\Client\Abstracts\Command; |
||||
| 6 | use Soheilrt\AdobeConnectClient\Client\Contracts\ArrayableInterface; |
||||
| 7 | use Soheilrt\AdobeConnectClient\Client\Converter\Converter; |
||||
| 8 | use Soheilrt\AdobeConnectClient\Client\Helpers\StatusValidate; |
||||
| 9 | use Soheilrt\AdobeConnectClient\Client\Helpers\StringCaseTransform as SCT; |
||||
| 10 | use Soheilrt\AdobeConnectClient\Client\Helpers\ValueTransform as VT; |
||||
| 11 | |||||
| 12 | /** |
||||
| 13 | * Updates the passed in field-id for the specified SCO, Principal or Account. |
||||
| 14 | * |
||||
| 15 | * More info see {@link https://helpx.adobe.com/adobe-connect/webservices/acl-field-update.html} |
||||
| 16 | */ |
||||
| 17 | class AclFieldUpdate extends Command |
||||
| 18 | { |
||||
| 19 | /** |
||||
| 20 | * @var array |
||||
| 21 | */ |
||||
| 22 | protected $parameters; |
||||
| 23 | |||||
| 24 | /** |
||||
| 25 | * @param int $aclId |
||||
| 26 | * @param string $fieldId |
||||
| 27 | * @param mixed $value |
||||
| 28 | * @param ArrayableInterface|null $extraParams |
||||
| 29 | */ |
||||
| 30 | public function __construct($aclId, $fieldId, $value, ArrayableInterface $extraParams = null) |
||||
| 31 | { |
||||
| 32 | $this->parameters = [ |
||||
| 33 | 'action' => 'acl-field-update', |
||||
| 34 | 'acl-id' => $aclId, |
||||
| 35 | 'field-id' => SCT::toHyphen($fieldId), |
||||
| 36 | 'value' => VT::toString($value), |
||||
| 37 | ]; |
||||
| 38 | |||||
| 39 | if ($extraParams) { |
||||
| 40 | $this->parameters += $extraParams->toArray(); |
||||
| 41 | } |
||||
| 42 | } |
||||
| 43 | |||||
| 44 | /** |
||||
| 45 | * {@inheritdoc} |
||||
| 46 | * |
||||
| 47 | * @return bool |
||||
| 48 | */ |
||||
| 49 | protected function process() |
||||
| 50 | { |
||||
| 51 | $response = Converter::convert( |
||||
| 52 | $this->client->doGet( |
||||
|
0 ignored issues
–
show
|
|||||
| 53 | $this->parameters + ['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. Loading history...
|
|||||
| 54 | ) |
||||
| 55 | ); |
||||
| 56 | StatusValidate::validate($response['status']); |
||||
| 57 | |||||
| 58 | return true; |
||||
| 59 | } |
||||
| 60 | } |
||||
| 61 |
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.