anh / sape-bundle
该包为sape.ru提供symfony集成
v2.0.2
2015-12-23 12:34 UTC
Requires
- anh/sape-php-client: ~1.2
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类