This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
AbstractFactory consistency #4364
Merged
ralphschindler
merged 10 commits into
zendframework:develop
from
weierophinney:hotfix/abstract-manager-prefix-removal
Apr 30, 2013
Merged
AbstractFactory consistency #4364
ralphschindler
merged 10 commits into
zendframework:develop
from
weierophinney:hotfix/abstract-manager-prefix-removal
Apr 30, 2013
Conversation
This file contains 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
- No longer needs "SessionContainer\\" prefix
... by extending the abstract factory and overriding the $configKey property.
... same as was done for session containers - Also caches configuration - Allows changing the configuration key via extension
- also made cache configuration key configurable, via extension
- Consistent getConfig() usage - Consistent naming
- We'd already started using the suffix "AbstractServiceFactory"; made this consistent on all new factories. - Updated the SessionManager configuration to the new names, and added Logger and Cache to the configuration.
- Not quite the same; you need to override getConfig() as it uses a subkey, and not a top-level key. Overall, though, much closer in design.
@@ -13,22 +13,22 @@ | |||
use Zend\ServiceManager\AbstractFactoryInterface; | |||
use Zend\ServiceManager\ServiceLocatorInterface; | |||
|
|||
class FormAbstractFactory implements AbstractFactoryInterface | |||
class FormAbstractServiceFactory implements AbstractFactoryInterface |
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.
Wouldn't be better to create a new subnamespace? -> Zend\Form\Service\FormAbstractFactory
.
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.
No. Because the FormElementManager is already in the component root namespace, it makes no sense to create a new subnamespace. If we'd anticipated multiple SM-related factories originally, yes.
- trailing whitespace
ralphschindler
pushed a commit
that referenced
this pull request
Apr 30, 2013
ralphschindler
pushed a commit
that referenced
this pull request
Apr 30, 2013
gianarb
pushed a commit
to zendframework/zend-session
that referenced
this pull request
May 15, 2015
Merge branch 'hotfix/abstract-manager-prefix-removal' of git://github.com/weierophinney/zf2 into weierophinney-hotfix/abstract-manager-prefix-removal
gianarb
pushed a commit
to zendframework/zend-session
that referenced
this pull request
May 15, 2015
Merge branch 'weierophinney-hotfix/abstract-manager-prefix-removal' into develop
gianarb
pushed a commit
to zendframework/zend-log
that referenced
this pull request
May 15, 2015
Merge branch 'hotfix/abstract-manager-prefix-removal' of git://github.com/weierophinney/zf2 into weierophinney-hotfix/abstract-manager-prefix-removal
gianarb
pushed a commit
to zendframework/zend-log
that referenced
this pull request
May 15, 2015
Merge branch 'weierophinney-hotfix/abstract-manager-prefix-removal' into develop
gianarb
pushed a commit
to zendframework/zend-cache
that referenced
this pull request
May 15, 2015
Merge branch 'hotfix/abstract-manager-prefix-removal' of git://github.com/weierophinney/zf2 into weierophinney-hotfix/abstract-manager-prefix-removal
gianarb
pushed a commit
to zendframework/zend-cache
that referenced
this pull request
May 15, 2015
Merge branch 'weierophinney-hotfix/abstract-manager-prefix-removal' into develop
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR aims to bring consistency to the various abstract factory implementations that have been created for 2.2.0. In particular:
Form\\
,Logger\\
, ``SessionContainer\`, etc.). The chances of collision are relatively slim, particularly with strong naming.$configKey
property or thegetConfig()
method. This allows re-purposing the factories to use alternate configuration when desired.AbstractServiceFactory
suffix. This was already in use for theDi
abstract factory, so it made sense to go with established naming.