You've already forked Php-Template
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Siteworxpro\App\Facades;
|
|
|
|
use Illuminate\Support\Facades\Facade;
|
|
use Siteworx\Config\Exception\EmptyDirectoryException;
|
|
use Siteworx\Config\Exception\FileNotFoundException;
|
|
use Siteworx\Config\Exception\UnsupportedFormatException;
|
|
|
|
/**
|
|
* Class Config
|
|
*
|
|
* This class serves as a facade for the configuration settings of the application.
|
|
* It extends the Facade class from the Illuminate\Support\Facades namespace.
|
|
*
|
|
* @method static string|int|bool|float get(string $key) Retrieve the configuration value for the given key.
|
|
*
|
|
* @package Siteworx\App\Facades
|
|
*/
|
|
class Config extends Facade
|
|
{
|
|
/**
|
|
* @throws UnsupportedFormatException
|
|
* @throws FileNotFoundException
|
|
* @throws EmptyDirectoryException
|
|
*/
|
|
public static function getFacadeRoot(): \Siteworx\Config\Config
|
|
{
|
|
return \Siteworx\Config\Config::load(__DIR__ . '/../../config.php');
|
|
}
|
|
|
|
/**
|
|
* Get the registered name of the component.
|
|
*
|
|
* @return string The name of the component.
|
|
*/
|
|
protected static function getFacadeAccessor(): string
|
|
{
|
|
return 'config';
|
|
}
|
|
} |