2017 © Pedro Peláez
 

library yii2-jsonbehavior

Advanced AR JSON support

image

sam-it/yii2-jsonbehavior

Advanced AR JSON support

  • Monday, September 18, 2017
  • by SamMousa
  • Repository
  • 1 Watchers
  • 1 Stars
  • 803 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 33 % Grown

The README.md

Scrutinizer Code Quality Code Coverage Build Status Total Downloads Latest Stable Version, (*1)

Yii2 JsonBehavior

Work with JSON fields in Yii2, (*2)

This behavior adds advanced support for working with JSON data in Yii AR models., (*3)

Use JSON fields like normal fields

Consider a model having a data attribute that is stored as JSON., (*4)

public function behaviors() {
    return [
        ['class' => JsonBehavior::class, 'jsonAttributes' => ['data']]
    ];
}

// Examples:
$model = new Model();
$model->a = "test"; // If attribute 'a' does not exist this is stored inside the data.

$model->a['b'] = 'c']; // Nested arrays are supported.

$model->data = ['x' => 'y']; // Assigning directly is supported.

The Versions

18/09 2017

dev-master

9999999-dev

Advanced AR JSON support

  Sources   Download

MIT

The Development Requires

by Joey Claessen

18/09 2017

v1.0.2

1.0.2.0

Advanced AR JSON support

  Sources   Download

MIT

The Development Requires

by Joey Claessen

18/09 2017

v1.0.1

1.0.1.0

Advanced AR JSON support

  Sources   Download

MIT

The Development Requires

by Joey Claessen

18/09 2017

v1.0.0

1.0.0.0

Advanced AR JSON support

  Sources   Download

MIT

The Development Requires

by Joey Claessen