- Drupal 8 Module Development
- Daniel Sipos
- 140字
- 2021-07-02 12:22:33
Services and the dependency injection container
Another architecturally important element of Drupal 8 is the Symfony dependency injection component (http://symfony.com/doc/current/components/dependency_injection.html), specifically represented by the service container.
This component is a staple of modern OOP PHP programming and as such has become foundational to Drupal 8. It allows us to create services that can be injected in various places of our code in order to handle certain functional (and oftentimes swappable) tasks. Additionally, they can also be used as an extension point because the service container is able to group services that have very specific responsibilities and use them for that automatically. In other words, simply by defining a simple service, we can provide our own functionality or even change existing logic.
We will encounter many services, and we will see how we can declare our own later in this book.
- HTML5+CSS3+JavaScript從入門到精通:上冊(微課精編版·第2版)
- 嵌入式軟件系統測試:基于形式化方法的自動化測試解決方案
- 數據結構和算法基礎(Java語言實現)
- PHP基礎案例教程
- Mastering Ubuntu Server
- Learning Three.js:The JavaScript 3D Library for WebGL
- Getting Started with Gulp
- C程序設計實踐教程
- Couchbase Essentials
- C語言程序設計習題與實驗指導
- 零基礎學Python編程(少兒趣味版)
- Software Development on the SAP HANA Platform
- Python 3快速入門與實戰
- Building UIs with Wijmo
- Game Development Patterns and Best Practices