2017 © Pedro Peláez
 

yii2-extension yii2-swivel

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

image

dhluther/yii2-swivel

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

  • Tuesday, October 4, 2016
  • by DanaLuther
  • Repository
  • 2 Watchers
  • 3 Stars
  • 70 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Yii 2.0 Extension for Zumba Swivel

This plugin provides the necessary elements for using Swivel in a Yii 2.0+ Application., (*1)

This plugin is based on the zumba/swivel-cake plugin., (*2)

Configuration for Yii Component:

 'swivel' => [ 
    'class'=>'dhluther\swivel\SwivelComponent' 
 ],

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., (*3)

In the index.php bootstrap:, (*4)

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

Add the swivel migration namespace to your migration command config

'migrationNamespaces'=>[
    'dhluther\\swivel\\migrations'
]

with the alias of:, (*5)

'@dhluther\swivel'=>'@vendor/dhluther/yii2-swivel/src'

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

./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

Note about PHP 8.2 Compatibility and Testing

As of this date, Yii 2.0 is not yet officially supporting PHP 8.2 To install the codeception/yii2-module you must force the composer update with --ignore-platform-req=php, (*7)

The Swivel Libraries

https://github.com/zumba/swivel, (*8)

https://github.com/zumba/swivel-cake, (*9)

The Versions

04/10 2016

dev-master

9999999-dev https://github.com/DanaLuther/yii2-swivel

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

  Sources   Download

BSD-3-Clause

The Requires

 

component extension yii2 helper behavior swivel

04/10 2016

1.0.1

1.0.1.0 https://github.com/DanaLuther/yii2-swivel

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

  Sources   Download

BSD-3-Clause

The Requires

 

component extension yii2 helper behavior swivel

20/03 2016

1.0.0

1.0.0.0 https://github.com/DanaLuther/yii2-swivel

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

  Sources   Download

BSD-3-Clause

The Requires

 

component extension yii2 helper behavior swivel