Newcomers are not very clear about some concepts of PHP symfony2
高洛峰
高洛峰 2017-06-29 10:08:20
0
1
691

1. The concept of event, for example, in what scenarios will event be used?
2. Regarding the concept of monitoring, it is also unclear what application scenarios would be better to use monitoring.
3. The concept of DI (injection), is the service introduced when it is needed? How is it different from ordinary public functions?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
洪涛
  1. event has many uses, such as processing user login completion (writing login log?), user payment completion processing (issuing payment notification?) and many more.

  2. Listening is the opposite of an event. An event has a listener (that is, the operation performed after the event is triggered (fire)). The event mechanism can be used to decouple the code.

  3. Dependency injection is a big concept. You can search to learn more about it. There are two general benefits:
    (1). Decoupling
    (2). Convenient for unit testing and mocking

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!