Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DocumentRoot.php
Go to the documentation of this file.
1 <?php
8 
12 
20 {
24  private $config;
25 
30  public function __construct(DeploymentConfig $config)
31  {
32  $this->config = $config;
33  }
34 
42  public function getPath()
43  {
44  return $this->isPub() ? DirectoryList::PUB : DirectoryList::ROOT;
45  }
46 
55  public function isPub()
56  {
57  return (bool)$this->config->get(ConfigOptionsListConstants::CONFIG_PATH_DOCUMENT_ROOT_IS_PUB);
58  }
59 }
$config
Definition: fraud_order.php:17