fancyguy/todomvc-client-bundle

TodoMVC客户端的Symfony/AngularJS实现

dev-master / 1.0.x-dev 2015-02-01 07:35 UTC

This package is not auto-updated.

Last update: 2024-09-14 16:08:29 UTC


README

此包实现了TodoMVC风格的API客户端接口,以突出FancyGuy Technologies定义的最佳实践,在PHP中实现Web客户端。

先决条件

此包需要Symfony 2.1+。

安装

  1. 使用composer下载FancyGuyTodoMVCClientBundle
  2. 启用该包
  3. 更新应用程序路由

步骤 1:使用composer下载FancyGuyTodoMVCClientBundle

运行以下命令添加FancyGuyTodoMVCClientBundle

$ composer require fancyguy/todomvc-client-bundle "1.0.x-dev"

Composer会将该包安装到项目的vendor/fancyguy目录中。

步骤 2:启用该包

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new FancyGuy\Bundle\FancyGuyTodoMVCClientBundle(),
    );
}

步骤 3:更新应用程序路由

# app/config/routing.yml
fancyguy_todomvc_client:
    resource: "@FancyGuyTodoMVCClientBundle/Controller/"
    type:     annotation
    prefix:   /client