Improved Compiler & Loader extendability#62
Merged
dg merged 1 commit intonette:masterfrom Jan 30, 2017
lookyman:extendability
Merged
Improved Compiler & Loader extendability#62dg merged 1 commit intonette:masterfrom lookyman:extendability
dg merged 1 commit intonette:masterfrom
lookyman:extendability
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.. |
912f91c to
94f96ad
Compare
2d6ac3c to
1d7d277
Compare
231a29c to
7f12a9f
Compare
9fbd1d4 to
a71f267
Compare
fb70434 to
a096ee8
Compare
14452ae to
db4f148
Compare
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.