2017 © Pedro Peláez
 

bundle timestampable

Automatic timestamps for Symfony entities.

image

todstoychev/timestampable

Automatic timestamps for Symfony entities.

  • Sunday, March 19, 2017
  • by todstoychev
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Requirements

  • symfony >= 3.0
  • php >= 7.0

Installation

Nothing special:, (*1)

  1. composer require todstoychev/timestampable;
  2. Add to AppKernel
    new Todstoychev\Timestampable\TimestampableBundle(),

Usage

Entity that will use automatic timestamps should implement Todstoychev\TimestampableBundle\Entity\TimestampableInterface. The interface implementation is released in Todstoychev\TimestampableBundle\Entity\Timestampable trait. So in your entity:, (*2)


use Todstoychev\TimestampableBundle\Entity\Timestampable; use Todstoychev\TimestampableBundle\Entity\Timestampable; class MyEntity implements TimestampableInterface { use Timestampable; }

Timestampable trait adds to entity 2 fields: createdAt and updatedAt. Describe those 2 in your entity configuration. If you are using anotations, override those 2 properties in your entity class., (*3)

That's all., (*4)

The Versions

19/03 2017

dev-master

9999999-dev

Automatic timestamps for Symfony entities.

  Sources   Download

MIT

The Requires

 

by Avatar todstoychev

19/03 2017

dev-develop

dev-develop

Automatic timestamps for Symfony entities.

  Sources   Download

MIT

The Requires

 

by Avatar todstoychev

19/03 2017

0.1.0

0.1.0.0

Automatic timestamps for Symfony entities.

  Sources   Download

MIT

The Requires

 

by Avatar todstoychev