scope is a
request type, the framework is not
初始化 when it is
Instead, lazy loading is used after the
onRequest event is triggered.
It will not be initialized when the framework is initialized.
It will only be initialized when it is actually called. The singleton will be kept in the current request and will be automatically destroyed after the request ends. The scope is always in one request
Can only be obtained by getting
$obj = BeanFactory::getRequestBean($name, (string) $tid);
- name requestBean 的名称/别名/类名
- tid 通常是与
request bean 。可以使用：
$pool = BeanFactory::getContainer()->getRequestPool()
After all coroutines have been executed, the
request bean bound to the
自动销毁 in the
At this point, the life cycle of the
request bean is over.