Source of file ScoDelete.php

Size: 0,990 Bytes - Last Modified: 2018-11-03T09:50:48-04:00

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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
<?php

namespace AdobeConnectClient\Commands;

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

/**
 * Deletes one or more objects (SCOs).
*
* More info see {@link https://helpx.adobe.com/adobe-connect/webservices/sco-delete.html}
 */
class ScoDelete extends Command
{
    /**
     * @var int
     */
    protected $scoId;

    /**
     *
     * @param int $scoId The SCO ID or Folder ID
     */
    public function __construct($scoId)
    {
        $this->scoId = (int) $scoId;
    }

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

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

        return true;
    }
}