Skip to content

Commit e383fd3

Browse files
committed
Update README.md
1 parent 70ab8fc commit e383fd3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ I think that everyone has their own idea of simple. In reality simple tends to
1212
* PSR-2 compliant
1313
* Per environment configuration.
1414
* PHP 6.4 and PHP 7 compatible.
15-
* No dependencies outside of core PHP.
1615
* Easy to debug from end to end. I want to hit very little code from the request to the custom logic in the controller.
1716
* A handful of common simple objects that you can optionally use, I'll decide as I go.
1817
* REST verbs route.
1918

2019
## What this framework does not have
20+
* Dependencies outside of core PHP.
21+
* Configuration file parsing.
2122
* "Magic" as that really just means "Have fun figuring out what I did". Assuming you have done some PHP I want you to easily understand what your debugger walks through, no magic. If you don't understand something feel free to send me a message.
2223
* No internal package system though you can add composer. The idea is that if your project becomes that big you should probably use something like service oriented architecture to split it up anyway. You can however easily pull in libraries with composer.
2324
* A bunch of other stuff that is common to frameworks, I did this as a quick side project but if you write something extremely light weight I'll consider a pull request. I may also add additional objects as I feel that I need to.
@@ -113,6 +114,11 @@ class WidgetController
113114
## How does the configuraton system work?
114115
It works almost exactly like the DI system but uses properties instead of methods. If you want to confgure something more complicated you can use methods as well just like the DI system.
115116

117+
If you want to have super secret stuff in your production file just check if the production file exists somewhere else with ConfigProd in it and load it. Once loaded the autoloader won't load the default ConfigProd.php file.
118+
119+
But can't this be done with a single file with switch statements in it? I couldn't find a way that would autocomplete (associative array is out), be global without saying global everywhere (again associative array is out), be overridden by different environments(defines were out), not require external file parsing (.ini files were out but then again they have the other issues too). So in the end I decided this worked the best. If you can figure this out please let me know.
120+
121+
116122
## Unit Testing
117123
In general you just put tests in the testing directory with the same structure as the classes you are testing in the classes directory. The environment is Testing and so the associated configuration and dependency injection classes will be loaded.
118124

0 commit comments

Comments
 (0)