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);
}
}