2017 © Pedro Peláez
 

yii2-extension yii2-mongodate-behavior

MongoDate behavior for Yii 2

image

mongosoft/yii2-mongodate-behavior

MongoDate behavior for Yii 2

  • Friday, July 8, 2016
  • by mongosoft
  • Repository
  • 1 Watchers
  • 5 Stars
  • 13,238 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 9 % Grown

The README.md

MongoDate behavior for Yii 2

MongoDateBehavior automatically fills the specified attributes with the current ISODate., (*1)

By default, MongoDateBehavior will fill the created and updated attributes with the current ISODate when the associated AR object is being inserted; it will fill the updated attribute with the ISODate when the AR object is being updated., (*2)

Latest Stable Version Total Downloads, (*3)

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist mongosoft/yii2-mongodate-behavior "*"

or add, (*6)

"mongosoft/yii2-mongodate-behavior": "*"

to the require section of your composer.json file., (*7)

Usage

Upload file

Attach the behavior in your model:, (*8)

class User extends ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function collectionName()
    {
        return 'user';
    }

    /**
     * @inheritdoc
     */
    public function attributes()
    {
        return [
            '_id', 'name', 'created', 'updated',
        ];
    }

    /**
     * @inheritdoc
     */
    function behaviors()
    {
        return [
            MongoDateBehavior::className(),
        ];
    }
}

The Versions

08/07 2016

dev-master

9999999-dev https://github.com/mongosoft/yii2-mongodate-behavior

MongoDate behavior for Yii 2

  Sources   Download

BSD 3-Clause

The Requires

 

by Alexander Mohorev

mongodb extension yii2 behavior mongodate

08/07 2016

0.2.0

0.2.0.0 https://github.com/mongosoft/yii2-mongodate-behavior

MongoDate behavior for Yii 2

  Sources   Download

BSD 3-Clause

The Requires

 

by Alexander Mohorev

mongodb extension yii2 behavior mongodate

29/11 2014

0.1.0

0.1.0.0 https://github.com/mongosoft/yii2-mongodate-behavior

MongoDate behavior for Yii 2

  Sources   Download

BSD 3-Clause

The Requires

 

by Alexander Mohorev

mongodb extension yii2 behavior mongodate