Shorten "PConfiguration" to "PConfig" again, since the Wrapper is gone
This commit is contained in:
+10
-9
@@ -8,9 +8,9 @@ use Exception;
|
||||
use Friendica\App\Arguments;
|
||||
use Friendica\App\BaseURL;
|
||||
use Friendica\App\Authentication;
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Config\IPConfiguration;
|
||||
use Friendica\Core\PConfig\IPConfig;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Theme;
|
||||
@@ -118,14 +118,14 @@ class App
|
||||
private $process;
|
||||
|
||||
/**
|
||||
* @var IPConfiguration
|
||||
* @var IPConfig
|
||||
*/
|
||||
private $pConfig;
|
||||
|
||||
/**
|
||||
* Returns the current config cache of this node
|
||||
*
|
||||
* @return ConfigCache
|
||||
* @return Cache
|
||||
*/
|
||||
public function getConfigCache()
|
||||
{
|
||||
@@ -153,9 +153,9 @@ class App
|
||||
* @param L10n $l10n The translator instance
|
||||
* @param App\Arguments $args The Friendica Arguments of the call
|
||||
* @param Core\Process $process The process methods
|
||||
* @param IPConfiguration $pConfig Personal configuration
|
||||
* @param IPConfig $pConfig Personal configuration
|
||||
*/
|
||||
public function __construct(Database $database, IConfig $config, App\Mode $mode, BaseURL $baseURL, LoggerInterface $logger, Profiler $profiler, L10n $l10n, Arguments $args, Core\Process $process, IPConfiguration $pConfig)
|
||||
public function __construct(Database $database, IConfig $config, App\Mode $mode, BaseURL $baseURL, LoggerInterface $logger, Profiler $profiler, L10n $l10n, Arguments $args, Core\Process $process, IPConfig $pConfig)
|
||||
{
|
||||
$this->database = $database;
|
||||
$this->config = $config;
|
||||
@@ -432,13 +432,14 @@ class App
|
||||
*
|
||||
* @param App\Module $module The determined module
|
||||
* @param App\Router $router
|
||||
* @param IPConfiguration $pconfig
|
||||
* @param IPConfig $pconfig
|
||||
* @param Authentication $auth The Authentication backend of the node
|
||||
* @param App\Page $page The Friendica page printing container
|
||||
* @param App\Page $page The Friendica page printing container
|
||||
*
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public function runFrontend(App\Module $module, App\Router $router, IPConfiguration $pconfig, Authentication $auth, App\Page $page)
|
||||
public function runFrontend(App\Module $module, App\Router $router, IPConfig $pconfig, Authentication $auth, App\Page $page)
|
||||
{
|
||||
$moduleName = $module->getName();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Friendica\App;
|
||||
use Exception;
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Config\IPConfiguration;
|
||||
use Friendica\Core\PConfig\IPConfig;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Core\System;
|
||||
@@ -46,7 +46,7 @@ class Authentication
|
||||
private $cookie;
|
||||
/** @var Session\ISession */
|
||||
private $session;
|
||||
/** @var IPConfiguration */
|
||||
/** @var IPConfig */
|
||||
private $pConfig;
|
||||
|
||||
/**
|
||||
@@ -60,9 +60,9 @@ class Authentication
|
||||
* @param LoggerInterface $logger
|
||||
* @param User\Cookie $cookie
|
||||
* @param Session\ISession $session
|
||||
* @param IPConfiguration $pConfig
|
||||
* @param IPConfig $pConfig
|
||||
*/
|
||||
public function __construct(IConfig $config, App\Mode $mode, App\BaseURL $baseUrl, L10n $l10n, Database $dba, LoggerInterface $logger, User\Cookie $cookie, Session\ISession $session, IPConfiguration $pConfig)
|
||||
public function __construct(IConfig $config, App\Mode $mode, App\BaseURL $baseUrl, L10n $l10n, Database $dba, LoggerInterface $logger, User\Cookie $cookie, Session\ISession $session, IPConfig $pConfig)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->mode = $mode;
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
namespace Friendica\App;
|
||||
|
||||
use Detection\MobileDetect;
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Util\BasePath;
|
||||
|
||||
@@ -65,7 +65,7 @@ class Mode
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function determine(BasePath $basepath, Database $database, ConfigCache $configCache)
|
||||
public function determine(BasePath $basepath, Database $database, Cache $configCache)
|
||||
{
|
||||
$mode = 0;
|
||||
|
||||
|
||||
+15
-15
@@ -8,7 +8,7 @@ use DOMXPath;
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Config\IPConfiguration;
|
||||
use Friendica\Core\PConfig\IPConfig;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
@@ -168,15 +168,15 @@ class Page implements ArrayAccess
|
||||
* - Infinite scroll data
|
||||
* - head.tpl template
|
||||
*
|
||||
* @param App $app The Friendica App instance
|
||||
* @param Module $module The loaded Friendica module
|
||||
* @param L10n $l10n The l10n language instance
|
||||
* @param IConfig $config The Friendica configuration
|
||||
* @param IPConfiguration $pConfig The Friendica personal configuration (for user)
|
||||
* @param App $app The Friendica App instance
|
||||
* @param Module $module The loaded Friendica module
|
||||
* @param L10n $l10n The l10n language instance
|
||||
* @param IConfig $config The Friendica configuration
|
||||
* @param IPConfig $pConfig The Friendica personal configuration (for user)
|
||||
*
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
private function initHead(App $app, Module $module, L10n $l10n, IConfig $config, IPConfiguration $pConfig)
|
||||
private function initHead(App $app, Module $module, L10n $l10n, IConfig $config, IPConfig $pConfig)
|
||||
{
|
||||
$interval = ((local_user()) ? $pConfig->get(local_user(), 'system', 'update_interval') : 40000);
|
||||
|
||||
@@ -342,17 +342,17 @@ class Page implements ArrayAccess
|
||||
/**
|
||||
* Executes the creation of the current page and prints it to the screen
|
||||
*
|
||||
* @param App $app The Friendica App
|
||||
* @param BaseURL $baseURL The Friendica Base URL
|
||||
* @param Mode $mode The current node mode
|
||||
* @param Module $module The loaded Friendica module
|
||||
* @param L10n $l10n The l10n language class
|
||||
* @param IConfig $config The Configuration of this node
|
||||
* @param IPConfiguration $pconfig The personal/user configuration
|
||||
* @param App $app The Friendica App
|
||||
* @param BaseURL $baseURL The Friendica Base URL
|
||||
* @param Mode $mode The current node mode
|
||||
* @param Module $module The loaded Friendica module
|
||||
* @param L10n $l10n The l10n language class
|
||||
* @param IConfig $config The Configuration of this node
|
||||
* @param IPConfig $pconfig The personal/user configuration
|
||||
*
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public function run(App $app, BaseURL $baseURL, Mode $mode, Module $module, L10n $l10n, IConfig $config, IPConfiguration $pconfig)
|
||||
public function run(App $app, BaseURL $baseURL, Mode $mode, Module $module, L10n $l10n, IConfig $config, IPConfig $pconfig)
|
||||
{
|
||||
$moduleName = $module->getName();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class AutomaticInstallation extends Console
|
||||
*/
|
||||
private $appMode;
|
||||
/**
|
||||
* @var Config\Cache\ConfigCache
|
||||
* @var \Friendica\Core\Config\Cache
|
||||
*/
|
||||
private $configCache;
|
||||
|
||||
@@ -89,7 +89,7 @@ Examples
|
||||
HELP;
|
||||
}
|
||||
|
||||
public function __construct(App\Mode $appMode, Config\Cache\ConfigCache $configCache, Config\IConfig $config, Database $dba, array $argv = null)
|
||||
public function __construct(App\Mode $appMode, Config\Cache $configCache, Config\IConfig $config, Database $dba, array $argv = null)
|
||||
{
|
||||
parent::__construct($argv);
|
||||
|
||||
@@ -241,13 +241,13 @@ HELP;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Installer $installer The Installer instance
|
||||
* @param Config\Cache\ConfigCache $configCache The config cache
|
||||
* @param Installer $installer The Installer instance
|
||||
* @param \Friendica\Core\Config\Cache $configCache The config cache
|
||||
*
|
||||
* @return bool true if checks were successfully, otherwise false
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
private function runBasicChecks(Installer $installer, Config\Cache\ConfigCache $configCache)
|
||||
private function runBasicChecks(Installer $installer, Config\Cache $configCache)
|
||||
{
|
||||
$checked = true;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Friendica\Console;
|
||||
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Core\Update;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBStructure;
|
||||
@@ -22,7 +22,7 @@ class DatabaseStructure extends \Asika\SimpleConsole\Console
|
||||
*/
|
||||
private $dba;
|
||||
/**
|
||||
* @var ConfigCache
|
||||
* @var Cache
|
||||
*/
|
||||
private $configCache;
|
||||
|
||||
@@ -48,7 +48,7 @@ HELP;
|
||||
return $help;
|
||||
}
|
||||
|
||||
public function __construct(Database $dba, ConfigCache $configCache, $argv = null)
|
||||
public function __construct(Database $dba, Cache $configCache, $argv = null)
|
||||
{
|
||||
parent::__construct($argv);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ use Friendica\Model;
|
||||
abstract class BaseConfig implements IConfig
|
||||
{
|
||||
/**
|
||||
* @var Cache\ConfigCache
|
||||
* @var Cache
|
||||
*/
|
||||
protected $configCache;
|
||||
|
||||
@@ -25,10 +25,10 @@ abstract class BaseConfig implements IConfig
|
||||
protected $configModel;
|
||||
|
||||
/**
|
||||
* @param Cache\ConfigCache $configCache The configuration cache (based on the config-files)
|
||||
* @param Model\Config\Config $configModel The configuration model
|
||||
* @param Cache $configCache The configuration cache (based on the config-files)
|
||||
* @param Model\Config\Config $configModel The configuration model
|
||||
*/
|
||||
public function __construct(Cache\ConfigCache $configCache, Model\Config\Config $configModel)
|
||||
public function __construct(Cache $configCache, Model\Config\Config $configModel)
|
||||
{
|
||||
$this->configCache = $configCache;
|
||||
$this->configModel = $configModel;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Core\Config;
|
||||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\Core\PConfig\Cache;
|
||||
use Friendica\Core\PConfig\IPConfig;
|
||||
use Friendica\Model;
|
||||
|
||||
/**
|
||||
@@ -11,10 +13,10 @@ use Friendica\Model;
|
||||
* The configuration cache (@see Cache\PConfigCache) is used for temporary caching of database calls. This will
|
||||
* increase the performance.
|
||||
*/
|
||||
abstract class PConfiguration implements IPConfiguration
|
||||
abstract class BasePConfig implements IPConfig
|
||||
{
|
||||
/**
|
||||
* @var Cache\PConfigCache
|
||||
* @var Cache
|
||||
*/
|
||||
protected $configCache;
|
||||
|
||||
@@ -24,10 +26,10 @@ abstract class PConfiguration implements IPConfiguration
|
||||
protected $configModel;
|
||||
|
||||
/**
|
||||
* @param Cache\PConfigCache $configCache The configuration cache
|
||||
* @param Model\Config\PConfig $configModel The configuration model
|
||||
* @param Cache $configCache The configuration cache
|
||||
* @param Model\Config\PConfig $configModel The configuration model
|
||||
*/
|
||||
public function __construct(Cache\PConfigCache $configCache, Model\Config\PConfig $configModel)
|
||||
public function __construct(Cache $configCache, Model\Config\PConfig $configModel)
|
||||
{
|
||||
$this->configCache = $configCache;
|
||||
$this->configModel = $configModel;
|
||||
@@ -36,7 +38,7 @@ abstract class PConfiguration implements IPConfiguration
|
||||
/**
|
||||
* Returns the Config Cache
|
||||
*
|
||||
* @return Cache\PConfigCache
|
||||
* @return Cache
|
||||
*/
|
||||
public function getCache()
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Core\Config\Cache;
|
||||
namespace Friendica\Core\Config;
|
||||
|
||||
use ParagonIE\HiddenString\HiddenString;
|
||||
|
||||
@@ -9,7 +9,7 @@ use ParagonIE\HiddenString\HiddenString;
|
||||
* Initial, all *.config.php files are loaded into this cache with the
|
||||
* ConfigFileLoader ( @see ConfigFileLoader )
|
||||
*/
|
||||
class ConfigCache
|
||||
class Cache
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
@@ -11,9 +11,7 @@ interface IConfig
|
||||
/**
|
||||
* Loads all configuration values of family into a cached storage.
|
||||
*
|
||||
* All configuration values of the system are stored in the cache ( @see ConfigCache )
|
||||
*
|
||||
* @param string $cat The category of the configuration value
|
||||
* All configuration values of the system are stored in the cache ( @param string $cat The category of the configuration value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -67,7 +65,7 @@ interface IConfig
|
||||
/**
|
||||
* Returns the Config Cache
|
||||
*
|
||||
* @return Cache\ConfigCache
|
||||
* @return Cache
|
||||
*/
|
||||
function getCache();
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ class JitConfig extends BaseConfig
|
||||
private $db_loaded;
|
||||
|
||||
/**
|
||||
* @param Cache\ConfigCache $configCache The configuration cache (based on the config-files)
|
||||
* @param Cache $configCache The configuration cache (based on the config-files)
|
||||
* @param Model\Config\Config $configModel The configuration model
|
||||
*/
|
||||
public function __construct(Cache\ConfigCache $configCache, Model\Config\Config $configModel)
|
||||
public function __construct(Cache $configCache, Model\Config\Config $configModel)
|
||||
{
|
||||
parent::__construct($configCache, $configModel);
|
||||
$this->db_loaded = [];
|
||||
|
||||
@@ -17,10 +17,10 @@ class PreloadConfig extends BaseConfig
|
||||
private $config_loaded;
|
||||
|
||||
/**
|
||||
* @param Cache\ConfigCache $configCache The configuration cache (based on the config-files)
|
||||
* @param Cache $configCache The configuration cache (based on the config-files)
|
||||
* @param Model\Config\Config $configModel The configuration model
|
||||
*/
|
||||
public function __construct(Cache\ConfigCache $configCache, Model\Config\Config $configModel)
|
||||
public function __construct(Cache $configCache, Model\Config\Config $configModel)
|
||||
{
|
||||
parent::__construct($configCache, $configModel);
|
||||
$this->config_loaded = false;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Friendica\Core;
|
||||
|
||||
use DOMDocument;
|
||||
use Exception;
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBStructure;
|
||||
use Friendica\DI;
|
||||
@@ -129,12 +129,12 @@ class Installer
|
||||
* - Creates `config/local.config.php`
|
||||
* - Installs Database Structure
|
||||
*
|
||||
* @param ConfigCache $configCache The config cache with all config relevant information
|
||||
* @param Cache $configCache The config cache with all config relevant information
|
||||
*
|
||||
* @return bool true if the config was created, otherwise false
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public function createConfig(ConfigCache $configCache)
|
||||
public function createConfig(Cache $configCache)
|
||||
{
|
||||
$basepath = $configCache->get('system', 'basepath');
|
||||
|
||||
@@ -618,12 +618,12 @@ class Installer
|
||||
/**
|
||||
* Setup the default cache for a new installation
|
||||
*
|
||||
* @param ConfigCache $configCache The configuration cache
|
||||
* @param string $basePath The determined basepath
|
||||
* @param Cache $configCache The configuration cache
|
||||
* @param string $basePath The determined basepath
|
||||
*
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public function setUpCache(ConfigCache $configCache, $basePath)
|
||||
public function setUpCache(Cache $configCache, $basePath)
|
||||
{
|
||||
$configCache->set('config', 'php_path' , $this->getPHPPath());
|
||||
$configCache->set('system', 'basepath' , $basePath);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Core\Config\Cache;
|
||||
namespace Friendica\Core\PConfig;
|
||||
|
||||
use ParagonIE\HiddenString\HiddenString;
|
||||
|
||||
/**
|
||||
* The Friendica config cache for users
|
||||
*/
|
||||
class PConfigCache
|
||||
class Cache
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Core\Config;
|
||||
namespace Friendica\Core\PConfig;
|
||||
|
||||
/**
|
||||
* Interface for accessing user specific configurations
|
||||
*/
|
||||
interface IPConfiguration
|
||||
interface IPConfig
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -17,7 +17,7 @@ interface IPConfiguration
|
||||
* @param string $cat The category of the configuration value
|
||||
*
|
||||
* @return void
|
||||
* @see PConfigCache
|
||||
* @see Cache
|
||||
*
|
||||
*/
|
||||
function load(int $uid, string $cat = 'config');
|
||||
@@ -76,7 +76,7 @@ interface IPConfiguration
|
||||
/**
|
||||
* Returns the Config Cache
|
||||
*
|
||||
* @return Cache\PConfigCache
|
||||
* @return Cache
|
||||
*/
|
||||
function getCache();
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Core\Config;
|
||||
namespace Friendica\Core\PConfig;
|
||||
|
||||
use Friendica\Core\BasePConfig;
|
||||
use Friendica\Model;
|
||||
|
||||
/**
|
||||
@@ -11,7 +12,7 @@ use Friendica\Model;
|
||||
* Default Configuration type.
|
||||
* Provides the best performance for pages loading few configuration variables.
|
||||
*/
|
||||
class JitPConfiguration extends PConfiguration
|
||||
class JitPConfig extends BasePConfig
|
||||
{
|
||||
/**
|
||||
* @var array Array of already loaded db values (even if there was no value)
|
||||
@@ -19,10 +20,10 @@ class JitPConfiguration extends PConfiguration
|
||||
private $db_loaded;
|
||||
|
||||
/**
|
||||
* @param Cache\PConfigCache $configCache The configuration cache
|
||||
* @param Cache $configCache The configuration cache
|
||||
* @param Model\Config\PConfig $configModel The configuration model
|
||||
*/
|
||||
public function __construct(Cache\PConfigCache $configCache, Model\Config\PConfig $configModel)
|
||||
public function __construct(Cache $configCache, Model\Config\PConfig $configModel)
|
||||
{
|
||||
parent::__construct($configCache, $configModel);
|
||||
$this->db_loaded = [];
|
||||
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Core\Config;
|
||||
namespace Friendica\Core\PConfig;
|
||||
|
||||
use Friendica\Core\BasePConfig;
|
||||
use Friendica\Model;
|
||||
|
||||
/**
|
||||
@@ -10,16 +11,16 @@ use Friendica\Model;
|
||||
*
|
||||
* Minimizes the number of database queries to retrieve configuration values at the cost of memory.
|
||||
*/
|
||||
class PreloadPConfiguration extends PConfiguration
|
||||
class PreloadPConfig extends BasePConfig
|
||||
{
|
||||
/** @var array */
|
||||
private $config_loaded;
|
||||
|
||||
/**
|
||||
* @param Cache\PConfigCache $configCache The configuration cache
|
||||
* @param Cache $configCache The configuration cache
|
||||
* @param Model\Config\PConfig $configModel The configuration model
|
||||
*/
|
||||
public function __construct(Cache\PConfigCache $configCache, Model\Config\PConfig $configModel)
|
||||
public function __construct(Cache $configCache, Model\Config\PConfig $configModel)
|
||||
{
|
||||
parent::__construct($configCache, $configModel);
|
||||
$this->config_loaded = [];
|
||||
+2
-2
@@ -141,11 +141,11 @@ abstract class DI
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Core\Config\IPConfiguration
|
||||
* @return \Friendica\Core\PConfig\IPConfig
|
||||
*/
|
||||
public static function pConfig()
|
||||
{
|
||||
return self::$dice->create(Core\Config\IPConfiguration::class);
|
||||
return self::$dice->create(Core\PConfig\IPConfig::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Friendica\Database;
|
||||
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
@@ -25,7 +25,7 @@ class Database
|
||||
protected $connected = false;
|
||||
|
||||
/**
|
||||
* @var ConfigCache
|
||||
* @var Cache
|
||||
*/
|
||||
protected $configCache;
|
||||
/**
|
||||
@@ -47,7 +47,7 @@ class Database
|
||||
protected $in_retrial = false;
|
||||
private $relation = [];
|
||||
|
||||
public function __construct(ConfigCache $configCache, Profiler $profiler, LoggerInterface $logger, array $server = [])
|
||||
public function __construct(Cache $configCache, Profiler $profiler, LoggerInterface $logger, array $server = [])
|
||||
{
|
||||
// We are storing these values for being able to perform a reconnect
|
||||
$this->configCache = $configCache;
|
||||
|
||||
@@ -13,23 +13,23 @@ class ConfigFactory
|
||||
/**
|
||||
* @param ConfigFileLoader $loader The Config Cache loader (INI/config/.htconfig)
|
||||
*
|
||||
* @return Cache\ConfigCache
|
||||
* @return Cache
|
||||
*/
|
||||
public function createCache(ConfigFileLoader $loader)
|
||||
{
|
||||
$configCache = new Cache\ConfigCache();
|
||||
$configCache = new Cache();
|
||||
$loader->setupCache($configCache);
|
||||
|
||||
return $configCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Cache\ConfigCache $configCache The config cache of this adapter
|
||||
* @param ConfigModel $configModel The configuration model
|
||||
* @param Cache $configCache The config cache of this adapter
|
||||
* @param ConfigModel $configModel The configuration model
|
||||
*
|
||||
* @return Config\IConfig
|
||||
*/
|
||||
public function createConfig(Cache\ConfigCache $configCache, ConfigModel $configModel)
|
||||
public function createConfig(Cache $configCache, ConfigModel $configModel)
|
||||
{
|
||||
if ($configCache->get('system', 'config_adapter') === 'preload') {
|
||||
$configuration = new Config\PreloadConfig($configCache, $configModel);
|
||||
@@ -42,18 +42,18 @@ class ConfigFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Cache\ConfigCache $configCache The config cache
|
||||
* @param Cache\PConfigCache $pConfigCache The personal config cache
|
||||
* @param PConfigModel $configModel The configuration model
|
||||
* @param Cache $configCache The config cache
|
||||
* @param \Friendica\Core\PConfig\Cache $pConfigCache The personal config cache
|
||||
* @param PConfigModel $configModel The configuration model
|
||||
*
|
||||
* @return Config\IPConfiguration
|
||||
* @return \Friendica\Core\PConfig\IPConfig
|
||||
*/
|
||||
public function createPConfig(Cache\ConfigCache $configCache, Cache\PConfigCache $pConfigCache, PConfigModel $configModel)
|
||||
public function createPConfig(Cache $configCache, \Friendica\Core\PConfig\Cache $pConfigCache, PConfigModel $configModel)
|
||||
{
|
||||
if ($configCache->get('system', 'config_adapter') === 'preload') {
|
||||
$configuration = new Config\PreloadPConfiguration($pConfigCache, $configModel);
|
||||
$configuration = new \Friendica\Core\PConfig\PreloadPConfig($pConfigCache, $configModel);
|
||||
} else {
|
||||
$configuration = new Config\JitPConfiguration($pConfigCache, $configModel);
|
||||
$configuration = new \Friendica\Core\PConfig\JitPConfig($pConfigCache, $configModel);
|
||||
}
|
||||
|
||||
return $configuration;
|
||||
|
||||
@@ -6,7 +6,7 @@ use Exception;
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Content\Text\HTML;
|
||||
use Friendica\Core\Config\IPConfiguration;
|
||||
use Friendica\Core\PConfig\IPConfig;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\System;
|
||||
@@ -71,13 +71,13 @@ final class Notify
|
||||
private $args;
|
||||
/** @var App\BaseURL */
|
||||
private $baseUrl;
|
||||
/** @var IPConfiguration */
|
||||
/** @var IPConfig */
|
||||
private $pConfig;
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
|
||||
public function __construct(Database $dba, L10n $l10n, App\Arguments $args, App\BaseURL $baseUrl,
|
||||
IPConfiguration $pConfig, LoggerInterface $logger)
|
||||
IPConfig $pConfig, LoggerInterface $logger)
|
||||
{
|
||||
$this->dba = $dba;
|
||||
$this->l10n = $l10n;
|
||||
|
||||
@@ -110,7 +110,7 @@ class Summary extends BaseAdminModule
|
||||
|
||||
// check legacy basepath settings
|
||||
$configLoader = new ConfigFileLoader($a->getBasePath());
|
||||
$configCache = new Config\Cache\ConfigCache();
|
||||
$configCache = new Config\Cache();
|
||||
$configLoader->setupCache($configCache);
|
||||
$confBasepath = $configCache->get('system', 'basepath');
|
||||
$currBasepath = DI::config()->get('system', 'basepath');
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Friendica\Module;
|
||||
use Friendica\App;
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core;
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPException;
|
||||
@@ -332,13 +332,13 @@ class Install extends BaseModule
|
||||
/**
|
||||
* Checks the $_POST settings and updates the config Cache for it
|
||||
*
|
||||
* @param ConfigCache $configCache The current config cache
|
||||
* @param Cache $configCache The current config cache
|
||||
* @param array $post The $_POST data
|
||||
* @param string $cat The category of the setting
|
||||
* @param string $key The key of the setting
|
||||
* @param null|string $default The default value
|
||||
*/
|
||||
private static function checkSetting(ConfigCache $configCache, array $post, $cat, $key, $default = null)
|
||||
private static function checkSetting(Cache $configCache, array $post, $cat, $key, $default = null)
|
||||
{
|
||||
$configCache->set($cat, $key,
|
||||
Strings::escapeTags(
|
||||
|
||||
@@ -4,10 +4,10 @@ namespace Friendica\Util;
|
||||
|
||||
use Exception;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\Cache;
|
||||
|
||||
/**
|
||||
* The ConfigFileLoader loads config-files and stores them in a ConfigCache ( @see ConfigCache )
|
||||
* The ConfigFileLoader loads config-files and stores them in a ConfigCache ( @see Cache )
|
||||
*
|
||||
* It is capable of loading the following config files:
|
||||
* - *.config.php (current)
|
||||
@@ -77,12 +77,12 @@ class ConfigFileLoader
|
||||
* First loads the default value for all the configuration keys, then the legacy configuration files, then the
|
||||
* expected local.config.php
|
||||
*
|
||||
* @param ConfigCache $config The config cache to load to
|
||||
* @param bool $raw Setup the raw config format
|
||||
* @param Cache $config The config cache to load to
|
||||
* @param bool $raw Setup the raw config format
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function setupCache(ConfigCache $config, $raw = false)
|
||||
public function setupCache(Cache $config, $raw = false)
|
||||
{
|
||||
// Load static config files first, the order is important
|
||||
$config->load($this->loadStaticConfig('defaults'));
|
||||
@@ -128,13 +128,13 @@ class ConfigFileLoader
|
||||
/**
|
||||
* Tries to load the specified core-configuration into the config cache.
|
||||
*
|
||||
* @param ConfigCache $config The Config cache
|
||||
* @param Cache $config The Config cache
|
||||
*
|
||||
* @return array The config array (empty if no config found)
|
||||
*
|
||||
* @throws Exception if the configuration file isn't readable
|
||||
*/
|
||||
private function loadCoreConfig(ConfigCache $config)
|
||||
private function loadCoreConfig(Cache $config)
|
||||
{
|
||||
// try to load legacy ini-files first
|
||||
foreach ($this->getConfigFiles(true) as $configFile) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Friendica\Util;
|
||||
|
||||
use Friendica\Core\Config\Cache\ConfigCache;
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\ContainerInterface;
|
||||
@@ -56,9 +56,9 @@ class Profiler implements ContainerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ConfigCache $configCache The configuration cache
|
||||
* @param Cache $configCache The configuration cache
|
||||
*/
|
||||
public function __construct(ConfigCache $configCache)
|
||||
public function __construct(Cache $configCache)
|
||||
{
|
||||
$this->enabled = $configCache->get('system', 'profiler');
|
||||
$this->rendertime = $configCache->get('rendertime', 'callstack');
|
||||
|
||||
Reference in New Issue
Block a user