Compare commits
	
		
			2 Commits
		
	
	
		
			9d9304d30e
			...
			feature/co
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| a7380841cf | |||
| 28dd69e3a5 | 
							
								
								
									
										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.
 | 
			
		||||
	 */
 | 
			
		||||
}
 | 
			
		||||
@@ -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.
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user