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

Installs: 16 113

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 2

Open Issues: 1


3.0.1 2023-12-22 17:07 UTC

This package is auto-updated.

Last update: 2024-06-22 18:19:14 UTC


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:

 '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 )

// 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');

Add the swivel migration namespace to your migration command config


with the alias of:


If you've already migrated this package in the past and want to mark it to the current migratoin via namespace, the command is

./yii migrate/mark dhluther\\swivel\\migrations\\m190812_083802

To add the composer vendor libraries for local development:

docker run --rm -v $PWD:/app composer update

The Swivel Libraries