chellem/transmission-bundle

Symfony TransmissionBundle

安装: 370

依赖者: 0

建议者: 0

安全: 0

星标: 4

关注者: 3

分支: 4

类型:symfony-bundle

v1.0.0 2015-01-05 04:57 UTC

This package is auto-updated.

Last update: 2024-08-24 23:32:57 UTC


README

Join the chat at https://gitter.im/labzone/TransmissionBundle

Build Status Scrutinizer Code Quality SensioLabsInsight

安装

使用 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 可用的任何其他方法