Source of file ScoMove.php

Size: 1,134 Bytes - Last Modified: 2018-11-03T09:50:48-04:00

G:/AdobeConnectClient/src/Commands/ScoMove.php

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
<?php

namespace AdobeConnectClient\Commands;

use AdobeConnectClient\Command;
use AdobeConnectClient\Converter\Converter;
use AdobeConnectClient\Helpers\StatusValidate;

/**
 * Move a SCO to other folder
 *
 * More Info see {@link https://helpx.adobe.com/adobe-connect/webservices/sco-move.html}
 */
class ScoMove extends Command
{
    /**
     * @var int
     */
    protected $scoId;

    /**
     * @var int
     */
    protected $folderId;

    /**
     * @param int $scoId
     * @param int $folderId
     */
    public function __construct($scoId, $folderId)
    {
        $this->scoId = (int) $scoId;
        $this->folderId = (int) $folderId;
    }

    /**
     * @inheritdoc
     *
     * @return bool
     */
    protected function process()
    {
        $response = Converter::convert(
            $this->client->doGet([
                'action' => 'sco-move',
                'sco-id' => $this->scoId,
                'folder-id' => $this->folderId,
                'session' => $this->client->getSession()
            ])
        );

        StatusValidate::validate($response['status']);

        return true;
    }
}