资源算法 yii2-swivel

yii2-swivel

2020-01-10 | |  39 |   0 |   0

Yii 2.0 Extension for Zumba Swivel

This plugin provides the necessary elements for using Swivel in a Yii 2.0+ 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'=>'dhlutherswivelSwivelComponent'  ],

Access from the application

// If the user has the feature behavior bucket enabled, use the testFeature.New.Something behavior,// else use the defaultYii::$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.

In the index.php bootstrap:

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

Initialize the swivel table by running the following migration, after configuring the component in your application:

./yii migrate --migrationPath=@dhluther/swivel/migrations

The Swivel Libraries

https://github.com/zumba/swivel

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


上一篇:yii-swivel

下一篇:swivel-cake

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...