PHP 框架 Ding Framework 1.6.1 發布
Ding 是一個 PHP 框架,提供依賴注入(通過 Setter/Constructor/Method)、面向方面編程、XML、YAML、事件支持,使用 JSR 250/330 注解進行 Bean 定義。輕量級,可發布為 PHAR 文件,簡單快速的 MVC 模型、syslog、非阻塞的 TCP socket 實現、定時器以及自定義錯誤、信號以及異常處理,PAGI 集成(用于 Asterisk 網關接口),PAMI 集成(用于 Asterisk 管理)。它具有以下特性:
- Scalable architecture, allowing to easily adopt new features.
- Supports XML, YAML, and annotations as bean definitions providers.
- Lightweight, easy of use, and useful.
- Loosed-couple, just use what you need and nothing more.
- JSR-250: @PostConstruct, @PreDestroy, @Resouce
- JSR-330: @Named, @Inject, @Singleton
- Spring specific: @Configuration, @Primary, @Value, @Scope, @Component, @Aspect, @Required, @Bean, @Controller, @RequestMapping
- Own specific: @Prototype, @InitMethod, @DestroyMethod, @ListensOn, @MethodInterceptor, @ExceptionInterceptor
- Aware interfaces: IContainerAware, IMessageSourceAware, IResourceLoaderAware, IBeanNameAware, IAspectManagerAware, ILoggerAware
- Bean inheritance through normal OOP or xml/yaml declarations.
- Bean aliasing for xml, yaml, and annotations.
- Extensions in the lifecycle: AfterDefinition, BeforeCreate, AfterCreate, BeforeAssemble, AfterAssemble
- Extensions for providing your own definitions: IBeanDefinitionProvider, IAspectProvider, IPointcutProvider
- Resources through php streams.
- Setter Injection (For arrays, scalar values, php code, and references to other beans).
- Constructor Injection (For the same data types as above).
- Method Injection (So you can have dependencies in singletons that must be created on demand).
- Can define factory beans, factory classes, and factory methods to create beans.
- Managed bean lifecycle (for singletons and prototypes).
- Initialization and destruction methods called by the container.
- Aspects (as in aspect oriented programming), for xml, yaml, and annotation drivers.
- Lightweight implementation of the MVC (Model View Controller) pattern. Can be used with or without Twig, and Smarty
- Annotations used by helpers and the container (i.e: @InitMethod, @DestroyMethod, @Controller, etc).
- Can cache proxies and bean definitions with Zend_Cache, Memcached, Filesystem, and APC.
- Integration with PAMI and PAGI. So you can make asterisk (telephony) applications via agi and ami.
- Helpers: Syslog, TCPServer, TCPClient, etc.
- Error Handling, Signal Handling, Shutdown Handling, all via events.
Ding Framework 1.6.1 發布,改進記錄:
This release moves signal definitions to the container constructor to avoid notices about undefined constants when running under a Web server module SAPI (pcntl is disabled under Web server modules)
本文由用戶 openkk 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!