[Core] Config file base service locator class

Review Request #101 — Created June 9, 2013 and submitted

pprkut
Lunr
pprkut:mysql_fix
123, 118
lunr
This is another service locator implementation, using config files (instead of lambdas in the other one) for object recipes.
Config files are small, can be loaded on demand and are cached, which are the main benefits over the rather cumbersome to setup lambda configuration.

Another benefit over the lambda configuration is way easier recursive instantiation and singleton handling.
Unit tests, prototype implementation for another project
  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
pprkut
dinos
  1. 
      
  2. src/Lunr/Core/ConfigServiceLocator.php (Diff revision 1)
     
     
    why do we return? As there is no manipulation on the $instance.
    1. It's used as a passthrough variable. Doing it that way makes IMHO the place where we call it from more readable and understandable.
      Also it opens up opportunities where we would want to modify $instance in the future.
  3. 
      
dinos
  1. Ship It!
  2. 
      
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master
Loading...