Move concerns to right places
This commit is contained in:
parent
28dd69e3a5
commit
a7380841cf
24
core/Configuration/ConfigurationLoader.php
Normal file
24
core/Configuration/ConfigurationLoader.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Core\Configuration;
|
||||
|
||||
class ConfigurationLoader
|
||||
{
|
||||
private const CONFIGURATIONS_DIRECTORY = __DIR__ . DIRECTORY_SEPARATOR
|
||||
. '..' . DIRECTORY_SEPARATOR
|
||||
. '..' . DIRECTORY_SEPARATOR . 'config'
|
||||
. DIRECTORY_SEPARATOR;
|
||||
|
||||
public function load(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Concerns
|
||||
* -> Loading configuration files
|
||||
* - Scan directory for files.
|
||||
* - Filtering none config / php files.
|
||||
* - Creating assoc array.
|
||||
*/
|
||||
}
|
@ -9,13 +9,17 @@ namespace Core\Configuration;
|
||||
*/
|
||||
class Configurations
|
||||
{
|
||||
/**
|
||||
* Concerns:
|
||||
* -> Loading configuration files
|
||||
* - Scan directory for files.
|
||||
* - Filtering none config / php files.
|
||||
* - Creating assoc array.
|
||||
* -> Storing assoc array to this object.
|
||||
* -> Accessing configurations based on "paths" application.something For example.
|
||||
*/
|
||||
/** @var array */
|
||||
private $configurations;
|
||||
|
||||
public function __construct(ConfigurationLoader $configurationLoader)
|
||||
{
|
||||
// Concern: Storing assoc array to this object.
|
||||
$this->configurations = $configurationLoader->load();
|
||||
}
|
||||
|
||||
public function get(string $path)
|
||||
{
|
||||
// Concern: Accessing configurations based on "paths" application.something For example.
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user