-
Notifications
You must be signed in to change notification settings - Fork 56
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
Implemented Interop Config Library #77
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the prooph/service-bus. | ||
* (c) 2014-2015 prooph software GmbH <contact@prooph.de> | ||
|
@@ -22,21 +23,20 @@ | |
*/ | ||
class CommandBusFactory extends AbstractBusFactory | ||
{ | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getBusClass() | ||
public function containerId() | ||
{ | ||
return CommandBus::class; | ||
return 'command_bus'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getBusConfigKey() | ||
protected function getBusClass() | ||
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. again, this is a service name registered in the container, it's not always a classname 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. also in this case the name is correct: https://github.com/prooph/service-bus/blob/master/src/Container/AbstractBusFactory.php#L61 The factory needs to know which bus class should be used to create the bus 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. ok sorry 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. np |
||
{ | ||
return 'command_bus'; | ||
return CommandBus::class; | ||
} | ||
|
||
/** | ||
|
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.
this must not be a class name. it's a service name registered in the container.
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.
the default is really a FQCN, see https://github.com/prooph/service-bus/blob/master/src/Container/AbstractBusFactory.php#L151
It is used to be able to create a bus without further dependencies
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.
ok