edbstatepersister EDbStatePersister implements IStatePersister using DB as storage

  1. Requirements
  2. Installing
  3. Usage

EDbStatePersister implements IStatePersister using DB as storage

You can always get an actual version at https://github.com/pavel-voronin/yii-EDbStatePersister/.

Requirements

  • Yii Framework 1.1.6+

Installing

Get yii-EDbStatePersister from github:

cd protected/extensions
git clone git://github.com/pavel-voronin/yii-EDbStatePersister.git

Add to `protected/config/main.php` the following:

'components' => array
(
  'statePersister' => array
  (
    'class' => 'ext.yii-EDbStatePersister.EDbStatePersister',
    'dbConnection' => 'db2', // defaults to 'db'. Db connection component must inherit CDbConnection class.
    'tableName' => 'myapp_states' // defaults to 'states'
  ),
),

Usage

EDbStatePersister fully implements IStatePersister, so you can use load() and save($state) methods in the same way as you did with CStatePersister before.

In addition, EDbStatePersister provides clear() method to remove state record from DB at all.

1 0
1 follower
157 downloads
Yii Version: Unknown
License: MIT
Category: Database
Developed by: Pavel Voronin
Created on: Sep 10, 2013
Last updated: 10 years ago

Downloads

show all

Related Extensions