API로 Zend Expressive을 사용하고 있습니다. API 키 요청 헤더의 유효성을 검사하는 미들웨어를 추가하는 데 성공했습니다. 순간 Zend Servicemanager를 사용하여 미들웨어를 파이프 할 수 있습니까?
나는이 실제로 꽤 잘 작동 설정에 middleware using the pipe() function/pipeline.php에게$app->pipe(new MyAuthMiddleware(....);
를 추가합니다.
return [
'dependencies' => [
/* ... */
'invokables' => [
// Remove this entry:
App\Action\HelloAction::class => App\Action\HelloAction::class,
],
'factories' => [
/* ... */
// Add this:
App\Action\HelloAction::class => App\Action\HelloActionFactory::class,
],
/* ... */
],];
질문 : 그러나, 나는처럼 configuration file로 대신 젠드에서는 ServiceManager를 사용하여 배관을 추가 할 는 젠드에서는 ServiceManager를 사용하여 미들웨어 파이프 할 수 있습니까? 그리고 만약 그렇다면 어떻게 될까요?