mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 08:14:25 +02:00
Refactored DependencyFactory for Profiler
This commit is contained in:
parent
cdcf1667d7
commit
5e5c39b0e1
12 changed files with 65 additions and 47 deletions
20
src/App.php
20
src/App.php
|
@ -12,7 +12,6 @@ use Friendica\Core\Config\Cache\ConfigCacheLoader;
|
|||
use Friendica\Core\Config\Cache\IConfigCache;
|
||||
use Friendica\Core\Config\Configuration;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Factory\ConfigFactory;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
@ -114,6 +113,11 @@ class App
|
|||
*/
|
||||
private $config;
|
||||
|
||||
/**
|
||||
* @var LoggerInterface The logger
|
||||
*/
|
||||
private $logger;
|
||||
|
||||
/**
|
||||
* @var Profiler The profiler of this app
|
||||
*/
|
||||
|
@ -139,6 +143,16 @@ class App
|
|||
return $this->basePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Logger of this app
|
||||
*
|
||||
* @return LoggerInterface
|
||||
*/
|
||||
public function getLogger()
|
||||
{
|
||||
return $this->logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* The profiler of this app
|
||||
*
|
||||
|
@ -192,7 +206,7 @@ class App
|
|||
* @brief App constructor.
|
||||
*
|
||||
* @param Configuration $config The Configuration
|
||||
* @param LoggerInterface $logger Logger of this application
|
||||
* @param LoggerInterface $logger The current app logger
|
||||
* @param Profiler $profiler The profiler of this application
|
||||
* @param bool $isBackend Whether it is used for backend or frontend (Default true=backend)
|
||||
*
|
||||
|
@ -200,8 +214,8 @@ class App
|
|||
*/
|
||||
public function __construct(Configuration $config, LoggerInterface $logger, Profiler $profiler, $isBackend = true)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->logger = $logger;
|
||||
$this->config = $config;
|
||||
$this->profiler = $profiler;
|
||||
$this->basePath = $this->config->get('system', 'basepath');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue