-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Added demo for amqp. #2
Conversation
README-CN.md
Outdated
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
class DemoConsumer extends Amqp\Message\ConsumerMessage |
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.
这里这么写感觉有点乱,改成匿名类的写法会不会好一些呢?
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.
嗯,我今天再改改
README-CN.md
Outdated
|
||
$app->addProcess(function () use ($container) { | ||
$message = new DemoConsumer(); | ||
$consumer = $container->get(Amqp\Consumer::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就行
fix #1