# Events & Event Subscribers (Symfony) > EventDispatcher, event subscribers, listeners, 커널 이벤트, 커스텀 이벤트, 우선순위 - 20 면접 질문 - Mid-Level - [면접 질문: Symfony](https://sharpskill.dev/ko/technologies/symfony/interview-questions.md) ## 1. Symfony에서 EventDispatcher 컴포넌트의 주요 역할은 무엇입니까? **답변** EventDispatcher 컴포넌트는 Observer pattern을 구현하며 애플리케이션의 서로 다른 부분을 분리할 수 있게 합니다. 컴포넌트들이 서로를 직접 알지 못한 채 listeners가 dispatch된 이벤트에 반응할 수 있게 하여 이벤트 관리를 중앙화합니다. 이를 통해 기존 코드를 수정하지 않고도 새 기능을 추가할 수 있는 모듈식이고 확장 가능한 아키텍처가 가능해집니다. ## 2. Symfony에서 Event Listener와 Event Subscriber의 주요 차이점은 무엇입니까? **답변** Event Subscriber는 EventSubscriberInterface를 구현하고 정적 메서드 getSubscribedEvents()를 통해 수신할 이벤트를 정의합니다. Listener는 services.yaml 또는 #[AsEventListener] 속성으로 구성되는 클래스 또는 callable입니다. Subscriber는 자기 기술적이고 이식성이 높은 반면, Listener는 외부 구성에서 더 많은 유연성을 제공합니다. ## 3. Symfony에서 적절한 인터페이스를 사용하여 Event Subscriber를 선언하려면 어떻게 해야 합니까? **답변** Event Subscriber는 EventSubscriberInterface를 구현하고 연관 배열을 반환하는 정적 메서드 getSubscribedEvents()를 정의해야 합니다. 키는 이벤트 이름이고 값은 메서드 이름, 메서드와 우선순위를 담은 배열, 또는 동일한 이벤트에 대한 여러 메서드를 위한 배열의 배열이 될 수 있습니다. ## 17개 추가 질문 이용 가능 - Symfony에서 HTTP 요청을 처리할 때 가장 먼저 발생하는 kernel 이벤트는 무엇입니까? - Symfony의 이벤트 우선순위 시스템은 어떻게 작동합니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Symfony 면접 주제 - [모던 PHP (8.1+)](https://sharpskill.dev/ko/technologies/symfony/interview-questions/php-modern-features.md): 20개 질문, Junior - [Symfony 기초](https://sharpskill.dev/ko/technologies/symfony/interview-questions/symfony-basics.md): 25개 질문, Junior - [Routing & Controllers](https://sharpskill.dev/ko/technologies/symfony/interview-questions/routing-controllers.md): 20개 질문, Junior - [Twig & Templates](https://sharpskill.dev/ko/technologies/symfony/interview-questions/twig-templates.md): 20개 질문, Junior - [Doctrine ORM 기초](https://sharpskill.dev/ko/technologies/symfony/interview-questions/doctrine-orm-basics.md): 25개 질문, Junior - [Symfony 폼](https://sharpskill.dev/ko/technologies/symfony/interview-questions/forms.md): 22개 질문, Junior - [데이터 유효성 검사](https://sharpskill.dev/ko/technologies/symfony/interview-questions/validation.md): 18개 질문, Junior - [Dependency Injection & Services](https://sharpskill.dev/ko/technologies/symfony/interview-questions/dependency-injection.md): 24개 질문, Mid-Level - [Security & Authentication](https://sharpskill.dev/ko/technologies/symfony/interview-questions/security-authentication.md): 26개 질문, Mid-Level - [Doctrine 고급](https://sharpskill.dev/ko/technologies/symfony/interview-questions/doctrine-advanced.md): 24개 질문, Mid-Level - [API Platform](https://sharpskill.dev/ko/technologies/symfony/interview-questions/api-platform.md): 22개 질문, Mid-Level - [Serializer Component](https://sharpskill.dev/ko/technologies/symfony/interview-questions/serializer.md): 20개 질문, Mid-Level - [Console & Commands](https://sharpskill.dev/ko/technologies/symfony/interview-questions/console-commands.md): 18개 질문, Mid-Level - [Messenger Component](https://sharpskill.dev/ko/technologies/symfony/interview-questions/messenger.md): 22개 질문, Mid-Level - [HTTP Client](https://sharpskill.dev/ko/technologies/symfony/interview-questions/http-client.md): 18개 질문, Mid-Level - [캐시 및 성능](https://sharpskill.dev/ko/technologies/symfony/interview-questions/cache.md): 20개 질문, Mid-Level - [Workflow Component](https://sharpskill.dev/ko/technologies/symfony/interview-questions/workflow.md): 18개 질문, Mid-Level - [Testing Symfony](https://sharpskill.dev/ko/technologies/symfony/interview-questions/testing.md): 22개 질문, Mid-Level - [Mailer Component](https://sharpskill.dev/ko/technologies/symfony/interview-questions/mailer.md): 16개 질문, Mid-Level - [번역 및 i18n](https://sharpskill.dev/ko/technologies/symfony/interview-questions/translations.md): 16개 질문, Mid-Level - [EasyAdmin Bundle](https://sharpskill.dev/ko/technologies/symfony/interview-questions/easyadmin.md): 18개 질문, Mid-Level - [Symfony 아키텍처](https://sharpskill.dev/ko/technologies/symfony/interview-questions/architecture-patterns.md): 24개 질문, Senior - [성능 및 최적화](https://sharpskill.dev/ko/technologies/symfony/interview-questions/performance-optimization.md): 22개 질문, Senior - [고급 보안](https://sharpskill.dev/ko/technologies/symfony/interview-questions/security-advanced.md): 22개 질문, Senior - [커스텀 번들](https://sharpskill.dev/ko/technologies/symfony/interview-questions/custom-bundles.md): 20개 질문, Senior - [Symfony를 사용한 마이크로서비스](https://sharpskill.dev/ko/technologies/symfony/interview-questions/microservices.md): 22개 질문, Senior - [Real-time & WebSockets](https://sharpskill.dev/ko/technologies/symfony/interview-questions/real-time.md): 18개 질문, Senior - [Deployment & DevOps](https://sharpskill.dev/ko/technologies/symfony/interview-questions/deployment-devops.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/symfony/interview-questions/events-subscribers