PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Jun 16, 2019 3:00 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Jun 01, 2012 4:18 pm 
Offline
Forum Contributor

Joined: Sat May 03, 2008 8:43 am
Posts: 268
I've extracted a dependency injection container from another project and adapted it somewhat so that it could be useful to more people. I don't know if i succeeded so I'm hoping to get some feedback, especially if usage makes sense.

Documentation is here:
https://github.com/koenhoeymans/Fjor/bl ... /index.txt

Or, maybe easier, the end-to-end tests:
https://github.com/koenhoeymans/Fjor/bl ... ocTest.php

An example from these tests. Suppose you have a class that asks for an object implementing ArrayAccess, you can tell Fjor to use an instance of SplObjectStorage, and use the same instance every time it is needed:

Syntax: [ Download ] [ Hide ]
$fjor->given('ArrayAccess')->thenUse('SplObjectStorage')->inSingletonScope();


I think the code makes it clear what it is all about but since I'm not natively english I may be wrong here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group