承接 dhluther/yii-swivel 相关项目开发

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

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

dhluther/yii-swivel

Composer 安装命令:

composer require dhluther/yii-swivel

包简介

A Yii plugin to provide easy access and integration with zumba/swivel

README 文档

README

This plugin provides the necessary elements for using Swivel in a Yii 1.1+ Application.

This plugin is based on the zumba/swivel-cake plugin.

Configuration for Yii Component:

By default, the component is assumed to be under the /protected/vendors/ directory, if your composer.json is under the protected folder. If you need to change that location, simply update the extensionAlias in the configuration array.

 'swivel' => [ 
 	'class'=>'SwivelComponent' 
 ],
 'swivel' => [ 
	'class'=>'SwivelComponent',
 	'extensionAlias'=>'application.extensions.swivel',
 ],

Access from the application

// If the user has the feature behavior bucket enabled, use the testFeature.New.Something behavior,
// else use the default
Yii::app()->swivel->forFeature( 'testFeature' )
	->addBehavior('New.Something', [$this,'doSomethingB'], $args)
	->defaultBehavior([$this, 'doSomethingA'], $args )
	->execute();

// If the user has the feature behavior bucket enabled, use the first callable,
// else use the second callable (default)
Yii::app()->swivel->invoke('testFeature.New.Something', [$this,'doSomethingB'],[$this, 'doSomethingA']);

Make sure that your bootstrap file is set to properly include the composer autoloader. This extension assumes that your vendor directory is under the protected folder, so if that is not the case, please make sure you adjust the paths accordingly in the require and configuration options.

In the index.php bootstrap:

require(__DIR__ . '/protected/vendor/autoload.php');

The Swivel Libraries

https://github.com/zumba/swivel

https://github.com/zumba/swivel-cake

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固