mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Move concerns to right places
This commit is contained in:
1 parent
28dd69e3a5
commit
a7380841cf
2 files changed
+37
-9
No files matched your search
@@ -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
|
class Configurations
|
||||||
{
|
{
|
||||||
/**
|
/** @var array */
|
||||||
* Concerns:
|
private $configurations;
|
||||||
* -> Loading configuration files
|
|
||||||
* - Scan directory for files.
|
public function __construct(ConfigurationLoader $configurationLoader)
|
||||||
* - Filtering none config / php files.
|
{
|
||||||
* - Creating assoc array.
|
// Concern: Storing assoc array to this object.
|
||||||
* -> Storing assoc array to this object.
|
$this->configurations = $configurationLoader->load();
|
||||||
* -> Accessing configurations based on "paths" application.something For example.
|
}
|
||||||
*/
|
|
||||||
|
public function get(string $path)
|
||||||
|
{
|
||||||
|
// Concern: Accessing configurations based on "paths" application.something For example.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user