public function createBackup($label, $components)
    {
        if ($this->connector->getURL() === null) {
            return 'Cannot find site URL from configuration.';
        }
        $url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backup';
        $params = [
            'label' => $label,
            'components' => $components,
        ];

        $response = $this->connector->connecting($url, $params, 'POST');

        // @codingStandardsIgnoreStart
        if (isset($response->task_id)) {
            return $response->task_id;
            // @codingStandardsIgnoreEnd
        }

        return $response;
    }
public function createBackup($label, $components)
    {
        if ($this->connector->getURL() === null) {
            return 'Cannot find site URL from configuration.';
        }
        $url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backup';
        $params = [
            'label' => $label,
            'components' => $components,
        ];

        $response = $this->connector->connecting($url, $params, 'POST');

        // @codingStandardsIgnoreStart
        if (isset($response->task_id)) {
            return $response->task_id;
            // @codingStandardsIgnoreEnd
        }

        return $response;
    }
public function createBackup ( $ label , $ components ) { if ( $ this -> connector -> getURL ( ) === null ) { return 'Cannot find site URL from configuration.' ; } $ url = $ this -> connector -> getURL ( ) . self :: VERSION . $ this -> connector -> getSiteID ( ) . '/backup' ; $ params = [ 'label' => $ label , 'components' => $ components , ] ; $ response = $ this -> connector -> connecting ( $ url , $ params , 'POST' ) ; // @codingStandardsIgnoreStart if ( isset ( $ response -> task_id ) ) { return $ response -> task_id ; // @codingStandardsIgnoreEnd } return $ response ; }
Create backup for specific site in site factory.

@param string $label      Backup label.
@param array  $components Backup components.

@return integer
Task ID.
Create backup for specific site in site factory .