-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf3fa96
commit 60ef51d
Showing
6 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,15 @@ | |
|
||
namespace Phoundation\Config\Loader; | ||
|
||
use Phoundation\Config\Config; | ||
|
||
/** | ||
* @author Nikola Posa <[email protected]> | ||
*/ | ||
class CachingLoader | ||
final class CachingConfigLoader implements ConfigLoaderInterface | ||
{ | ||
public function __invoke() : Config | ||
{ | ||
// TODO: Implement __invoke() method. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
/** | ||
* @author Nikola Posa <[email protected]> | ||
*/ | ||
final class FileLoader extends AbstractLoader | ||
final class FileConfigLoader extends AbstractLoader | ||
{ | ||
/** | ||
* @var array | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
/** | ||
* @author Nikola Posa <[email protected]> | ||
*/ | ||
final class StaticLoader implements ConfigLoaderInterface | ||
final class StaticConfigLoader implements ConfigLoaderInterface | ||
{ | ||
/** | ||
* @var array | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,20 +13,20 @@ | |
namespace Phoundation\Tests\Config; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Phoundation\Config\Loader\FileLoader; | ||
use Phoundation\Config\Loader\FileConfigLoader; | ||
use Phoundation\Config\Config; | ||
|
||
/** | ||
* @author Nikola Posa <[email protected]> | ||
*/ | ||
class FileLoaderTest extends TestCase | ||
class FileConfigLoaderTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function it_loads_config_from_path() | ||
{ | ||
$loader = new FileLoader([ | ||
$loader = new FileConfigLoader([ | ||
__DIR__ . '/../../TestAsset/Config/global.php', | ||
]); | ||
|
||
|
@@ -41,7 +41,7 @@ public function it_loads_config_from_path() | |
*/ | ||
public function it_loads_config_from_glob_path() | ||
{ | ||
$loader = new FileLoader(glob(__DIR__ . '/../../TestAsset/Config/{{,*.}global,{,*.}local}.php', GLOB_BRACE)); | ||
$loader = new FileConfigLoader(glob(__DIR__ . '/../../TestAsset/Config/{{,*.}global,{,*.}local}.php', GLOB_BRACE)); | ||
|
||
$config = $loader(); | ||
|
||
|