Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DebuggerFactory.php
Go to the documentation of this file.
1 <?php
7 
10 
19 {
23  private $objectManager;
24 
28  private $config;
29 
36  public function __construct(
37  ObjectManagerInterface $objectManager,
38  Config $config
39  ) {
40  $this->objectManager = $objectManager;
41  $this->config = $config;
42  }
43 
50  public function create($storeId = null): DebuggerInterface
51  {
52  if (!$this->config->isDebugModeEnabled($storeId)) {
53  return $this->objectManager->get(BlackHole::class);
54  }
55 
56  return $this->objectManager->get(Log::class);
57  }
58 }
$objectManager
Definition: bootstrap.php:17
$config
Definition: fraud_order.php:17
__construct(ObjectManagerInterface $objectManager, Config $config)