chellem / transmission-bundle
Symfony TransmissionBundle
v1.0.0
2015-01-05 04:57 UTC
Requires
- php: >=5.3.2
- kleiram/transmission-php: ~1.0.0
- symfony/framework-bundle: ~2.2
This package is auto-updated.
Last update: 2024-08-24 23:32:57 UTC
README
安装
使用 Composer
{ "require": { "chellem/transmission-bundle": "dev-master" } }
配置
注册组件
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Transmission\Bundle\TransmissionBundle\TransmissionBundle(), ); // ... }
在您的 config.yml 中进行配置
# app/config/config.yml transmission: ~
默认:host: 127.0.0.1 port: 9091 username: null password: null
完整配置
# app/config/config.yml transmission: host: localhost port: 9091 username: null password: null
作为服务使用
// ... $transmission = $this->container->get('transmission'); $torrents = $transmission->all(); $torrent = $transmission->get(1); // ...
您可以使用通过 transmission-php 可用的任何其他方法