anh/sape-bundle

该包为sape.ru提供symfony集成

安装: 172

依赖者: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

v2.0.2 2015-12-23 12:34 UTC

This package is auto-updated.

Last update: 2024-09-06 09:34:32 UTC


README

该包为sape.ru提供symfony集成

安装

使用composer命令安装

$ php composer.phar require 'anh/sape-bundle:~2.0'

在内核中启用包

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Anh\SapeBundle\AnhSapeBundle()
    );

    // ...
}

配置

#config.yml
anh_sape:
    user: '...' # your sape user id (f.e. 80e20e4a72a1d09895763b4b1bc98e63)
    client_options: { charset: 'utf8' } # options for SAPE_client, not required, default: {charset: 'utf8'}

使用方法

Twig函数

{{ sape_return_links() }}
{{ sape_return_block_links() }}

注意

目前仅实现了SAPE_client