定制 herrera-io/dateinterval-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

herrera-io/dateinterval-bundle

Composer 安装命令:

composer require herrera-io/dateinterval-bundle

包简介

A Symfony bundle for the DateInterval library for Doctrine.

README 文档

README

Build Status

A Symfony bundle for the DateInterval library for Doctrine.

Summary

The bundle will automatically

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

to the default entity manager (doctrine.orm.entity_manager).

Installation

Add it to your list of Composer dependencies:

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

Add it to your app/AppKernel.php file:

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

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-02-21