2017 © Pedro Peláez
 

library doctrine-extensions

A set of minimalistic Doctrine 2 ORM extensions.

image

v3labs/doctrine-extensions

A set of minimalistic Doctrine 2 ORM extensions.

  • Thursday, May 15, 2014
  • by v3labs
  • Repository
  • 0 Watchers
  • 0 Stars
  • 80 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

V3 Labs Doctrine ORM Extensions

This library aims to be a minimalistic set of Doctrine 2 ORM extensions for php >=5.4. I'm developing this library for a project in my company. I am using it in production. The API is in no way stable(yet). More extensions will be added. I will try to keep the docs updated. Any help will be appreciated., (*1)

Timestampable

First you must register the timestampable event listener:, (*2)

``` php, (*3)

<?php, (*4)

use V3labs\DoctrineExtensions\ORM\Timestampable\TimestampableListener;, (*5)

// ..., (*6)

$em->getEventManager()->addEventSubscriber(new TimestampableListener);, (*7)


If you are a Symfony2 user you can add this to your config.yaml: ``` yaml services: v3labs.doctrine_extensions.timestampable_listener: class: "V3labs\DoctrineExtensions\ORM\Timestampable\TimestampableListener" public: false tags: - { name: doctrine.event_subscriber }

An entity using this extension would loke like this:, (*8)

``` php <?php, (*9)

namespace Some\Namespace;, (*10)

use Doctrine\ORM\Mapping as ORM; use V3labs\DoctrineExtensions\ORM\Timestampable\Timestampable;, (*11)

/** * Event * * @ORM\Table() * @ORM\Entity */ class Event { use Timestampable;, (*12)

// Rest of your entity

}, (*13)

```, (*14)

The Versions

15/05 2014

dev-master

9999999-dev

A set of minimalistic Doctrine 2 ORM extensions.

  Sources   Download

MIT

The Requires