Skip to content

Commit

Permalink
Extension: added helperSet configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jankonas authored and f3l1x committed May 21, 2017
1 parent 84d2678 commit dca7e23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ console:
catchExceptions: true / false
autoExit: true / false
url: https://contributte.com
helperSet: @customHelperSet
```

In fact in console mode / SAPI mode is no http request and thus no URL address. It is inconvenience you have to solve by yoursolve.
Expand Down
5 changes: 5 additions & 0 deletions src/DI/ConsoleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class ConsoleExtension extends CompilerExtension
'version' => NULL,
'catchExceptions' => NULL,
'autoExit' => NULL,
'helperSet' => NULL,
];

/**
Expand Down Expand Up @@ -55,6 +56,10 @@ public function loadConfiguration()
if ($config['autoExit'] !== NULL) {
$application->addSetup('autoExit', [(bool) $config['autoExit']]);
}

if ($config['helperSet'] !== NULL) {
$application->addSetup('setHelperSet', [$config['helperSet']]);
}
}

/**
Expand Down

0 comments on commit dca7e23

Please sign in to comment.