swis/moonphase-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

swis/moonphase-bundle

Composer 安装命令:

composer require swis/moonphase-bundle

包简介

This Bundle integrates some moon phase calculation stuff into a Symfony2 project.

README 文档

README

Build Status

This Bundle is designed to add some moon phase calculation stuff to your Symfony2 project.

Installation

Installation by Composer

If you use composer, add the bundle as dependency to the composer.json of your application

for Symfony 2.x

"require": {
    ...
    "swis/moonphase-bundle": "dev-master"
    ...
},

Installation via git submodule

    git submodule add git://github.com/swis/MoonPhaseBundle.git vendor/bundles/Swis/Bundle/MoonPhaseBundle

Instantiate Bundle in your kernel init file

// app/AppKernel.php
<?php
    // ...
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Swis\Bundle\MoonPhaseBundle\SwisMoonPhaseBundleBundle(),
        );
    }

Base configuration

Actually, there is no configuration needed.

Usage

In your controller, use

// src/Acme/HelloBundle/Controller/HelloController.php
namespace Acme\HelloBundle\Controller;

class HelloController
{
    public function indexAction($name)
    {
        // ...

        $lastNewMoonAsDateTime = $this->get('swis_moon_calculator')->getLastNewMoon();

        // ...
    }
}

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-25