xp-forge / inject

Dependency injection for the XP Framework
0 stars 0 forks source link

New syntax #7

Closed thekid closed 9 years ago

thekid commented 9 years ago

This pull request introduces a new way (pun intended!) to use the injector:

// Before
$instance= $injector->get(T::class);

// After
$instance= $injector->new(T::class);

BC is kept w/ the get() verb but support for PHP 5.x is dropped - this feature relies on the context sensitive lexer RFC

thekid commented 9 years ago

PHP 5.x is dropped

Can be reopened once PHP 7 has a more widespread adoption...