staffim/datetime-bundle

为 Symfony2 提供对 DateTime 的改进的 Bundle

2.1 2018-05-22 08:41 UTC

This package is auto-updated.

Last update: 2024-09-05 18:18:15 UTC


README

Build Status SensioLabsInsight

StaffimDateTime(StaffimDateTime)用于 Symfony。Bundle 为模型提供 Timestampable 接口/特性,为 Serializer 处理器,以及 Staffim\DateTime 类的 Doctrine MongoDB 类型处理器。

安装

安装 StaffimDateTimeBundle

安装此 Bundle 的首选方法是依赖 Composer。只需在 Packagist 上检查您想安装的版本,并将其添加到您的 composer.json 文件中。

{
    "require": {
        // ...
        "staffim/datetime-bundle": "1.0"
    }
}

在 Kernel 中启用 Bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Staffim\DateTimeBundle\StaffimDateTimeBundle(),
    );
}