Improved Compiler & Loader extendability - #62
Merged
Conversation
Contributor
|
Can you describe the use case? |
Contributor
Author
<?php
use Tester\Assert;
require __DIR__ . '/../bootstrap.php';
class TestCompiler extends Nette\DI\Compiler
{
public function createLoader()
{
return (new Nette\DI\Config\Loader)->addAdapter('yml', new YmlAdapter);
}
}
$compiler = new TestCompiler;
$compiler->loadConfig(__DIR__ . '/config.yml');
$container = $compiler->compile();
// Tester::assert(...)And yes, I do realize that currently I only have to override a method that is just three lines longer. Or load the config with my own loader and pass it to |
Member
|
createLoader & createCompiler should be protected. |
Contributor
Author
|
@dg right.. |
dg
force-pushed
the
master
branch
5 times, most recently
from
June 10, 2015 11:52
912f91c to
94f96ad
Compare
dg
force-pushed
the
master
branch
3 times, most recently
from
June 19, 2015 11:58
2d6ac3c to
1d7d277
Compare
dg
force-pushed
the
master
branch
2 times, most recently
from
April 21, 2016 13:03
231a29c to
7f12a9f
Compare
dg
force-pushed
the
master
branch
9 times, most recently
from
May 11, 2016 07:11
9fbd1d4 to
a71f267
Compare
dg
force-pushed
the
master
branch
3 times, most recently
from
May 23, 2016 09:23
fb70434 to
a096ee8
Compare
dg
force-pushed
the
master
branch
11 times, most recently
from
January 15, 2017 14:09
14452ae to
db4f148
Compare
dg
force-pushed
the
master
branch
14 times, most recently
from
January 30, 2017 00:30
5d38530 to
c005bde
Compare
dg
pushed a commit
that referenced
this pull request
Jan 30, 2017
dg
pushed a commit
that referenced
this pull request
Jan 30, 2017
dg
pushed a commit
that referenced
this pull request
Feb 2, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.