Skip to content

Add support for parameters (custom extension) #23

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

Merged
merged 2 commits into from
Mar 9, 2020

Conversation

universe-42
Copy link
Contributor

Useful when its working with environment variables...

Useful when is working wit environment variables...
@@ -19,6 +19,9 @@ class NetteDIModule extends Module

/** @var callable[] function(Container $container): void; */
public $onCreateContainer = [];

/** @var array */
Copy link
Member

@f3l1x f3l1x Mar 8, 2020

Choose a reason for hiding this comment

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

Suggested change
/** @var array */
/** @var mixed[] */

Comment on lines 135 to 140
$parameters = array_merge($this->parameters, [
'appDir' => $this->path . ($this->config['appDir'] !== null ? '/' . $this->config['appDir'] : ''),
'wwwDir' => $this->path . ($this->config['wwwDir'] !== null ? '/' . $this->config['wwwDir'] : ''),
]);

$configurator->addParameters($parameters);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is still very limiting. Please split createContainer into createConfigurator and createContainer. Should work like that: create and configure configurator, run onCreateConfigurator events, create container, run onCreateContainer events

@f3l1x f3l1x merged commit 2465e4e into contributte:master Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants