2017 © Pedro Peláez
 

library dateinterval-bundle

A Symfony bundle for the DateInterval library for Doctrine.

image

zoddo/dateinterval-bundle

A Symfony bundle for the DateInterval library for Doctrine.

  • Saturday, March 14, 2015
  • by Zoddo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 168 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

DateInterval Bundle

A Symfony bundle for the DateInterval library for Doctrine., (*1)

Summary

The bundle will automatically, (*2)

  • register the dateinterval Doctrine mapping type
  • add the DATE_INTERVAL DQL function

to the default entity manager (doctrine.orm.entity_manager)., (*3)

Installation

Add it to your list of Composer dependencies:, (*4)

$ composer require zoddo/dateinterval-bundle=1.* herrera-io/doctrine-dateinterval=dev-master@dev

Add it to your app/AppKernel.php file:, (*5)

<?php

public function registerBundles()
{
    $bundles = array(
        // ... snip ...
        new Herrera\Symfony\DateInterval\DateIntervalBundle()
        // ... snip ...
    );
}

Usage

In your entities

<?php

class MyEntity
{
    /**
     * @ORM\Column(type="dateinterval")
     */
    private $interval;
}

In your queries

SELECT j FROM Jobs j WHERE j.interval < DATE_INTERVAL('PT1H')

The Versions

14/03 2015

dev-master

9999999-dev

A Symfony bundle for the DateInterval library for Doctrine.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Zoddo

date interval

14/03 2015

v1.0.0

1.0.0.0

A Symfony bundle for the DateInterval library for Doctrine.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Zoddo

date interval