承接 protec/zf2-traits 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

protec/zf2-traits

Composer 安装命令:

composer require protec/zf2-traits

包简介

Package that provides standard ZF implementations as traits

README 文档

README

Build Status

Zend Framework 2 is awesome. PHP 5.4 is also awesome. Combine both, using new PHP 5.4 features to make developing with Zend Framework 2 more fun!

Installation

Add "protec/zf2-traits": "dev-master" to your composer.json file and run php composer.phar update.

Awareness Traits

Zend Framework 2 has several *AwareTraits, used to automatically inject * into your classes when loaded via the service locator. These traits decrease code duplication by providing a standard implementation for these interfaces. Usage is pretty simple too. Just take the full name of the interface (including namespace), replace the 'Interface' part with 'Trait', and the '\Zend' part with '\Protec\ZF2Trait', and use this trait within your class:

class MyClass implements \Zend\ServiceManager\ServiceLocatorAwareInterface
{
    use \Protec\ZF2Trait\ServiceManager\ServiceLocatorAwareTrait;
}

Please Note - ZF2 > 2.0.7

As of ZF2 2.0.7 - these are now available as part of Zend Framework itself - you should be able to swap out "\Protec\ZF2Trait" for "\Zend"

统计信息

  • 总下载量: 83
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 7
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2012-11-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固