-
Notifications
You must be signed in to change notification settings - Fork 6
ViewHelperProviderInterface #3
base: develop
Are you sure you want to change the base?
Changes from all commits
5d84ca2
75dd4c4
797f864
6a3ebd7
fe89d93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
use Zend\ModuleManager\Feature\SerializerProviderInterface; | ||
use Zend\ModuleManager\Feature\ServiceProviderInterface; | ||
use Zend\ModuleManager\Feature\ValidatorProviderInterface; | ||
use Zend\ModuleManager\Feature\ViewHelperProviderInterface; | ||
|
||
/** | ||
* Provide configuration by consuming zend-modulemanager Module classes. | ||
|
@@ -62,6 +63,7 @@ public function __invoke() : array | |
'hydrators' => $this->getHydratorConfig(), | ||
'input_filters' => $this->getInputFilterConfig(), | ||
'serializers' => $this->getSerializerConfig(), | ||
'view_helpers' => $this->getViewHelperConfig(), | ||
])); | ||
} | ||
|
||
|
@@ -177,7 +179,7 @@ public function getHydratorConfig() : array | |
return $this->convert($this->module->getHydratorConfig()); | ||
} | ||
|
||
public function getInputFilterConfig() | ||
public function getInputFilterConfig() /* : array */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does it help with anything now? Or it is just added because it was missed in that place as 'hard' RTH? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I obviously forgot to add this in the first release. |
||
{ | ||
if (! $this->module instanceof InputFilterProviderInterface) { | ||
return []; | ||
|
@@ -194,4 +196,13 @@ public function getSerializerConfig() : array | |
|
||
return $this->convert($this->module->getSerializerConfig()); | ||
} | ||
|
||
public function getViewHelperConfig() : array | ||
{ | ||
if (! $this->module instanceof ViewHelperProviderInterface) { | ||
return []; | ||
} | ||
|
||
return $this->convert($this->module->getViewHelperConfig()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if it should be considered as "new feature" or a bugfix.
Also description should be a bit extended, to describe what is the fix/feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it is a "new feature" as the
view_helpers
array key didnt exist in the first place.It would be a bug if we say "we are handling every method in your module" but actually we just had the features provided by the current
ConfigProvider
.I am not sure if its a bugfix as the package never said that it can parse the
view_helpers
config at all.