polidog/vaddy-bundle

0.0.1 2015-07-14 17:45 UTC

This package is auto-updated.

Last update: 2024-09-21 19:47:20 UTC


README

Build Status Coverage Status

这是一个用于与VAddy进行集成的Bundle。

功能

  • 只需设置认证代码,即可无需认证文件。

使用方法

composer install

$ composer.phar require polidog/vaddy-bundle

AppKernel.php

// vim app/AppKernel.php



    public function registerBundles()
    {
        $bundles = array(
            ...
            new Polidog\VaddyBundle\VaddyBundle(),
        );

config.yml

xxxxxxxxx→VAddy的Verification Code。

// vim app/config/config.yml


vaddy:
    verification: 'xxxxxxxxx'

更好的书写方式

// vim app/parameters.yml

vaddy_verification_code: 'xxxxxxxxx'
// vim app/config/config.yml

vaddy:
    verification: %vaddy_verification_code%

routing.yml

// vim app/config/routing.yml

vaddy:
    resource: "@VaddyBundle/Resources/config/routing.yml"

确认设置是否完成

$ app/console debug:router vaddy_verification
Name         vaddy_verification
Path         /vaddy-xxxxxxxxx.html
Path Regex   #^/vaddy\-xxxxxxxxx\.html$#s
Host         ANY
Host Regex
Scheme       ANY
Method       ANY
Class        Symfony\Component\Routing\Route
Defaults     _controller: vaddy.controller.verification:indexAction
Requirements NO CUSTOM
Options      compiler_class: Symfony\Component\Routing\RouteCompiler

实际通过http访问

$ curl localhost:8000/vaddy-xxxxxxxxx.html
xxxxxxxxx

完成以上步骤后,随意将服务器部署,然后在VAddy的管理界面中点击Verify按钮。

待办事项

  • 实现Vaddy Client,使其可通过app/console使用。