mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Shorten "Configuration" to "Config" again, since the Wrapper is gone
This commit is contained in:
parent
21640ec5d8
commit
cb80108957
53 changed files with 183 additions and 179 deletions
|
@ -1,7 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Core\Config;
|
||||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Model;
|
||||
|
||||
/**
|
||||
|
@ -10,7 +12,7 @@ use Friendica\Model;
|
|||
* - The Config-Files (loaded into the FileCache @see Cache\ConfigCache)
|
||||
* - The Config-DB-Table (per Config-DB-model @see Model\Config\Config)
|
||||
*/
|
||||
abstract class Configuration implements IConfiguration
|
||||
abstract class BaseConfig implements IConfig
|
||||
{
|
||||
/**
|
||||
* @var Cache\ConfigCache
|
|
@ -4,7 +4,7 @@ namespace Friendica\Core\Cache;
|
|||
|
||||
use Exception;
|
||||
use Friendica\Core\BaseCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Memcache;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ class MemcacheCache extends BaseCache implements IMemoryCache
|
|||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct(string $hostname, IConfiguration $config)
|
||||
public function __construct(string $hostname, IConfig $config)
|
||||
{
|
||||
if (!class_exists('Memcache', false)) {
|
||||
throw new Exception('Memcache class isn\'t available');
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Friendica\Core\Cache;
|
|||
|
||||
use Exception;
|
||||
use Friendica\Core\BaseCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Memcached;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
@ -40,7 +40,7 @@ class MemcachedCache extends BaseCache implements IMemoryCache
|
|||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct(string $hostname, IConfiguration $config, LoggerInterface $logger)
|
||||
public function __construct(string $hostname, IConfig $config, LoggerInterface $logger)
|
||||
{
|
||||
if (!class_exists('Memcached', false)) {
|
||||
throw new Exception('Memcached class isn\'t available');
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Friendica\Core\Cache;
|
|||
|
||||
use Exception;
|
||||
use Friendica\Core\BaseCache;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Redis;
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ class RedisCache extends BaseCache implements IMemoryCache
|
|||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct(string $hostname, IConfiguration $config)
|
||||
public function __construct(string $hostname, IConfig $config)
|
||||
{
|
||||
if (!class_exists('Redis', false)) {
|
||||
throw new Exception('Redis class isn\'t available');
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Friendica\Core\Config;
|
|||
/**
|
||||
* Interface for accessing system wide configurations
|
||||
*/
|
||||
interface IConfiguration
|
||||
interface IConfig
|
||||
{
|
||||
|
||||
/**
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Friendica\Core\Config;
|
||||
|
||||
use Friendica\Core\BaseConfig;
|
||||
use Friendica\Model;
|
||||
|
||||
/**
|
||||
|
@ -11,7 +12,7 @@ use Friendica\Model;
|
|||
* Default Configuration type.
|
||||
* Provides the best performance for pages loading few configuration variables.
|
||||
*/
|
||||
class JitConfiguration extends Configuration
|
||||
class JitConfig extends BaseConfig
|
||||
{
|
||||
/**
|
||||
* @var array Array of already loaded db values (even if there was no value)
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Friendica\Core\Config;
|
||||
|
||||
use Friendica\Core\BaseConfig;
|
||||
use Friendica\Model;
|
||||
|
||||
/**
|
||||
|
@ -10,7 +11,7 @@ use Friendica\Model;
|
|||
*
|
||||
* Minimizes the number of database queries to retrieve configuration values at the cost of memory.
|
||||
*/
|
||||
class PreloadConfiguration extends Configuration
|
||||
class PreloadConfig extends BaseConfig
|
||||
{
|
||||
/** @var bool */
|
||||
private $config_loaded;
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Session\ISession;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Util\Strings;
|
||||
|
@ -40,7 +40,7 @@ class L10n
|
|||
*/
|
||||
private $logger;
|
||||
|
||||
public function __construct(IConfiguration $config, Database $dba, LoggerInterface $logger, ISession $session, array $server, array $get)
|
||||
public function __construct(IConfig $config, Database $dba, LoggerInterface $logger, ISession $session, array $server, array $get)
|
||||
{
|
||||
$this->dba = $dba;
|
||||
$this->logger = $logger;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
|
@ -28,7 +28,7 @@ final class Process
|
|||
private $mode;
|
||||
|
||||
/**
|
||||
* @var IConfiguration
|
||||
* @var IConfig
|
||||
*/
|
||||
private $config;
|
||||
|
||||
|
@ -37,7 +37,7 @@ final class Process
|
|||
*/
|
||||
private $basePath;
|
||||
|
||||
public function __construct(LoggerInterface $logger, App\Mode $mode, IConfiguration $config, string $basepath)
|
||||
public function __construct(LoggerInterface $logger, App\Mode $mode, IConfig $config, string $basepath)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
$this->mode = $mode;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace Friendica\Core;
|
||||
|
||||
use Exception;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Model\Storage;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
@ -35,7 +35,7 @@ class StorageManager
|
|||
|
||||
/** @var Database */
|
||||
private $dba;
|
||||
/** @var IConfiguration */
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
|
@ -47,11 +47,11 @@ class StorageManager
|
|||
|
||||
/**
|
||||
* @param Database $dba
|
||||
* @param IConfiguration $config
|
||||
* @param IConfig $config
|
||||
* @param LoggerInterface $logger
|
||||
* @param L10n $l10n
|
||||
*/
|
||||
public function __construct(Database $dba, IConfiguration $config, LoggerInterface $logger, L10n $l10n)
|
||||
public function __construct(Database $dba, IConfig $config, LoggerInterface $logger, L10n $l10n)
|
||||
{
|
||||
$this->dba = $dba;
|
||||
$this->config = $config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue