Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
ConfigFilePool Class Reference

Public Member Functions

 __construct ($additionalConfigFiles=[])
 
 getPaths ()
 
 getPath ($fileKey)
 
 getInitialFilePools ()
 
 getPathsByPool ($pool)
 

Data Fields

const APP_CONFIG = 'app_config'
 
const APP_ENV = 'app_env'
 
const LOCAL = 'local'
 
const DIST = 'dist'
 

Detailed Description

Stores file key to file name config @api

Since
100.0.2

Definition at line 14 of file ConfigFilePool.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $additionalConfigFiles = [])

Constructor

Parameters
array$additionalConfigFiles

Definition at line 61 of file ConfigFilePool.php.

62  {
63  $this->applicationConfigFiles = array_merge($this->applicationConfigFiles, $additionalConfigFiles);
64  }

Member Function Documentation

◆ getInitialFilePools()

getInitialFilePools ( )

Returns application initial config files.

Returns
array
Deprecated:
101.0.0 Magento does not support custom config file pools since 2.2.0 version
Since
100.1.3

Definition at line 98 of file ConfigFilePool.php.

99  {
100  return $this->initialConfigFiles;
101  }

◆ getPath()

getPath (   $fileKey)

Returns file path by config key

Parameters
string$fileKey
Returns
string
Exceptions

Definition at line 83 of file ConfigFilePool.php.

84  {
85  if (!isset($this->applicationConfigFiles[$fileKey])) {
86  throw new \Exception('File config key does not exist.');
87  }
88  return $this->applicationConfigFiles[$fileKey];
89  }

◆ getPaths()

getPaths ( )

Returns application config files.

Returns
array

Definition at line 71 of file ConfigFilePool.php.

72  {
73  return $this->applicationConfigFiles;
74  }

◆ getPathsByPool()

getPathsByPool (   $pool)

Retrieve all config file pools.

Parameters
string$pool
Returns
array
Deprecated:
101.0.0 Magento does not support custom config file pools since 2.2.0 version
Since
100.1.3

Definition at line 111 of file ConfigFilePool.php.

112  {
113  return $this->initialConfigFiles[$pool];
114  }

Field Documentation

◆ APP_CONFIG

const APP_CONFIG = 'app_config'

Definition at line 16 of file ConfigFilePool.php.

◆ APP_ENV

const APP_ENV = 'app_env'

Definition at line 17 of file ConfigFilePool.php.

◆ DIST

const DIST = 'dist'
Deprecated:
Magento does not support custom config file pools since 2.2.0 version

Definition at line 27 of file ConfigFilePool.php.

◆ LOCAL

const LOCAL = 'local'
Deprecated:
Magento does not support custom config file pools since 2.2.0 version

Definition at line 22 of file ConfigFilePool.php.


The documentation for this class was generated from the following file: