HEX
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: u112718762 (3890930)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //homepages/oneclick/WordPress/6.9/601/scripts/exceptions/configurationexception.php
<?php
namespace Exceptions;

class ConfigurationException extends \Exception
{
    const CONFIG_NOT_FOUND = 1;
    const CONFIG_NOT_FOUND_MESSAGE = 'wp-config.php not found in path %s';

    const CONFIG_PATH_NOT_EXISTING = 2;
    const CONFIG_PATH_NOT_EXISTING_MESSAGE = 'configuration base path not existing %s';

    const CONFIG_EMPTY = 3;
    const CONFIG_EMPTY_MESSAGE = 'configuration is empty in path %s';

    /**
     * @param int $type
     * @param array $params
     * @return ConfigurationException
     */
    public static function createException($type, $params = null)
    {
        if (!is_array($params) && !empty($params)) {
            $params = array($params);
        }
        return new ConfigurationException(vsprintf(self::CONFIG_NOT_FOUND_MESSAGE, $params), $type);
    }
}