Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create container factory #79

Merged
merged 3 commits into from
Oct 2, 2015
Merged

Create container factory #79

merged 3 commits into from
Oct 2, 2015

Conversation

gianarb
Copy link
Contributor

@gianarb gianarb commented Oct 1, 2015

Reference #77

@wdalmut

@@ -43,38 +43,13 @@ class App
*/
public function __construct(ContainerInterface $container = null)
{
$this->container = $container ?: static::buildContainer(Loader::load());
$container = &$this->container;
$this->container = $container ?: Container\PHPDiFactory::buildContainer(Loader::load());

if ($container->has('router') == false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $container variable is valid? Or should be $this->container?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested! :) Now is more readable

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah comes from the method parameter... sorry miss-read at that time...

@gianarb gianarb force-pushed the feature/di-factory branch from b93b8f0 to 27e1782 Compare October 2, 2015 08:18
@gianarb gianarb force-pushed the feature/di-factory branch from 27e1782 to 7455612 Compare October 2, 2015 22:26
gianarb pushed a commit that referenced this pull request Oct 2, 2015
@gianarb gianarb merged commit 726f3af into master Oct 2, 2015
@gianarb gianarb deleted the feature/di-factory branch October 5, 2015 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants