GOOD SHELL MAS BOY
Server: Apache/2.4.52 (Ubuntu)
System: Linux vmi1836763.contaboserver.net 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64
User: www-data (33)
PHP: 8.4.10
Disabled: NONE
Upload Files
File: //proc/thread-self/cwd/vendor/cloudinary/cloudinary_php/src/Configuration/CloudConfigTrait.php
<?php
/**
 * This file is part of the Cloudinary PHP package.
 *
 * (c) Cloudinary
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Cloudinary\Configuration;

/**
 * Trait CloudConfigTrait
 *
 */
trait CloudConfigTrait
{
    /**
     * Sets the name of your Cloudinary cloud.
     *
     * @param string $cloudName The name of your Cloudinary cloud.
     *                          Used to build the public URL for all your media assets.
     *
     * @return $this
     *
     * @api
     */
    public function cloudName($cloudName)
    {
        return $this->setCloudConfig(CloudConfig::CLOUD_NAME, $cloudName);
    }

    /**
     * Sets the OAuth2.0 token.
     *
     * @param string $oauthToken Used instead of API key and API secret
     *
     * @return $this
     *
     * @api
     */
    public function oauthToken($oauthToken)
    {
        return $this->setCloudConfig(CloudConfig::OAUTH_TOKEN, $oauthToken);
    }

    /**
     * Sets the signature algorithm.
     *
     * @param string $signatureAlgorithm The algorithm to use. (Can be SHA1 or SHA256).
     *
     * @return $this
     *
     * @api
     */
    public function signatureAlgorithm($signatureAlgorithm)
    {
        return $this->setCloudConfig(CloudConfig::SIGNATURE_ALGORITHM, $signatureAlgorithm);
    }

    /**
     * Sets the Cloud configuration key with the specified value.
     *
     * @param string $configKey   The configuration key.
     * @param mixed  $configValue THe configuration value.
     *
     * @return $this
     *
     * @internal
     */
    abstract public function setCloudConfig($configKey, $configValue);
}