Skip to content
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 Context::override() method #405

Merged
merged 5 commits into from
Aug 16, 2019
Merged

Conversation

huangzhhui
Copy link
Member

Examples:

Context::override(ResponseInterface::class, function ($response) {
    return $this->buildResponse($response);
});

$value = self::get($id);
}
$value = $closure($value);
self::set($id, $value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里直接用value函数是不是好点

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉没有必要,我参数约束了肯定是个 Closure 的

@limingxinleo limingxinleo merged commit 63f2e85 into hyperf:1.0 Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants