2017 © Pedro Peláez
 

library dateinterval-bundle

A Symfony bundle for the DateInterval library for Doctrine.

image

herrera-io/dateinterval-bundle

A Symfony bundle for the DateInterval library for Doctrine.

  • Friday, February 22, 2013
  • by kherge
  • Repository
  • 0 Watchers
  • 1 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

DateInterval Bundle

Build Status, (*1)

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

Summary

The bundle will automatically, (*3)

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

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

Installation

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

$ composer require herrera-io/dateinterval-bundle=1.*

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

<?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

22/02 2013

dev-master

9999999-dev http://herrera-io.github.com/php-symfony-dateinterval

A Symfony bundle for the DateInterval library for Doctrine.

  Sources   Download

MIT

The Requires

 

The Development Requires

date interval