Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Proposal: DispatcherInterface #30

Merged
merged 1 commit into from
Jul 11, 2016

Conversation

zf2timo
Copy link
Contributor

@zf2timo zf2timo commented May 5, 2016

This pull Request introduces a "DispatcherInerface" for the easy exchange of the dispatcher with own implementations.

In my project I have a plugin manager that provides me the commands. To integrate this into the dispatcher, it was only possible by inheritance, which has led to some difficulties.
The interface would have been easier.

<?php

$commands = [....];
$commandManager = new CommandManager($commands);
$commandDispatcher = new CommandDispatcher($commandManager);
$application = new Application(
        'FooApp',
        '99.0.0',
        [....],
        null,
        $commandDispatcher);
$application->run();

// ...

I also thought about to mark the dispatcher as final, but that would mean a BC break, which is why this will be done at a later date.

Thoughts?

@weierophinney weierophinney added this to the 1.3.0 milestone Jul 11, 2016
@weierophinney weierophinney self-assigned this Jul 11, 2016
@weierophinney weierophinney merged commit 80154a3 into zfcampus:develop Jul 11, 2016
weierophinney added a commit that referenced this pull request Jul 11, 2016
weierophinney added a commit that referenced this pull request Jul 11, 2016
weierophinney added a commit that referenced this pull request Jul 11, 2016
weierophinney added a commit that referenced this pull request Jul 11, 2016
@weierophinney
Copy link
Member

Thanks, @zf2timo !

@zf2timo zf2timo deleted the feature/dispatch-interface branch July 12, 2016 05:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants