Refactored DependencyFactory for Profiler
This commit is contained in:
+17
-3
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user