Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Config.php
Go to the documentation of this file.
1 <?php
9 namespace Magento\Backend\App;
10 
13 
17 class Config implements ConfigInterface
18 {
22  protected $appConfig;
23 
27  private $data;
28 
33  public function __construct(\Magento\Framework\App\Config $appConfig)
34  {
35  $this->appConfig = $appConfig;
36  }
37 
41  public function getValue($path)
42  {
43  if (isset($this->data[$path])) {
44  return $this->data[$path];
45  }
46 
48  if ($path) {
49  $configPath .= '/' . $path;
50  }
51  return $this->appConfig->get(System::CONFIG_TYPE, $configPath);
52  }
53 
57  public function setValue($path, $value)
58  {
59  $this->data[$path] = $value;
60  }
61 
65  public function isSetFlag($path)
66  {
68  if ($path) {
69  $configPath .= '/' . $path;
70  }
71  return (bool) $this->appConfig->get(System::CONFIG_TYPE, $configPath);
72  }
73 }
setValue($path, $value)
Definition: Config.php:57
$value
Definition: gender.phtml:16
__construct(\Magento\Framework\App\Config $appConfig)
Definition: Config.php:33