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: /var/www/html/vendor/cloudinary/transformation-builder-sdk/src/Transformation/BaseComponent.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\Transformation;

use Cloudinary\ClassUtils;
use Cloudinary\StringUtils;

/**
 * Class BaseComponent
 */
abstract class BaseComponent implements ComponentInterface
{
    /**
     * @var string $name The name of the component.
     */
    protected static $name;

    /**
     * BaseComponent constructor.
     *
     * @param mixed ...$args
     */
    public function __construct(...$args)
    {
        //static::getName();
    }

    /**
     * Internal collector of the component class constants.
     *
     * @param array $constantsList The constants that are set in the previous run of the function.
     *
     * @return array
     *
     * @internal
     */
    protected static function getConstants(&$constantsList = null)
    {
        if (! empty($constantsList)) {
            return $constantsList;
        }

        $constantsList = ClassUtils::getConstants(static::class);

        return $constantsList;
    }

    /**
     * Gets the component name.
     *
     * Internal.
     *
     * @return string The component name.
     *
     * @internal
     */
    public static function getName()
    {
        $name = static::$name;

        if (empty($name)) {
            $name = StringUtils::camelCaseToSnakeCase(ClassUtils::getBaseName(static::class));
        }

        return $name;
    }

    /**
     * Non-static method for getting full name that can be determined only during runtime.
     *
     * Internal.
     *
     * @return string The component full name.
     *
     * @internal
     */
    public function getFullName()
    {
        return self::getName();
    }
}