src/Ovh/Cloud/Pca.php
public function addTask(array $task)
    {
        if (!array_key_exists('sessionId', $task))
            throw new BadMethodCallException("Parameter $task must have the key 'sessionId'");
        if (!array_key_exists('taskFunction', $task))
            throw new BadMethodCallException("Parameter $task must have the key 'taskFunction'");

        if ($task['taskFunction'] == 'restore') {
            return json_decode(self::getClient()->createPcaRestoreTask($this->pp, $this->sn,$task['sessionId']));
        } elseif ($task['taskFunction'] == 'delete') {
            return json_decode(self::getClient()->createPcaDeleteTask($this->pp, $this->sn,$task['sessionId']));
        }
        throw new BadMethodCallException("Task function available are 'delete' or 'restore'");   
    }
public function addTask(array $task)
    {
        if (!array_key_exists('sessionId', $task))
            throw new BadMethodCallException("Parameter $task must have the key 'sessionId'");
        if (!array_key_exists('taskFunction', $task))
            throw new BadMethodCallException("Parameter $task must have the key 'taskFunction'");

        if ($task['taskFunction'] == 'restore') {
            return json_decode(self::getClient()->createPcaRestoreTask($this->pp, $this->sn,$task['sessionId']));
        } elseif ($task['taskFunction'] == 'delete') {
            return json_decode(self::getClient()->createPcaDeleteTask($this->pp, $this->sn,$task['sessionId']));
        }
        throw new BadMethodCallException("Task function available are 'delete' or 'restore'");   
    }
Add a new task (restore, delete)

@param  array $task. Keys : string sessionId, string taskFunction (restore|delete), array of string fileIds.
@return object task
@throws \Ovh\Common\Exception\BadMethodCallException
@deprecated Use addDeleteTask or addRestoreTask