2 Commits

Author SHA1 Message Date
a7380841cf Move concerns to right places 2020-12-15 22:02:02 +01:00
28dd69e3a5 Write concerns 2020-12-15 21:55:39 +01:00
2 changed files with 39 additions and 1 deletions

View 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.
*/
}

View File

@@ -8,4 +8,18 @@ namespace Core\Configuration;
* @author Romano Schoonheim https://github.com/romano1996
*/
class Configurations
{}
{
/** @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.
}
}