定制 rezzza/shorty-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rezzza/shorty-bundle

最新稳定版本:v1.2.1

Composer 安装命令:

composer require rezzza/shorty-bundle

包简介

Underwear for your long urls in Symfony

README 文档

README

https://poser.pugx.org/rezzza/shorty-bundle/version.png https://travis-ci.org/rezzza/ShortyBundle.png?branch=master

Underwear for your long urls in Symfony.

Integration of Shorty library.

Installation

Use Composer to install: rezzza/shorty-bundle.

In your composer.json you should have:

{
    "require": {
        "rezzza/shorty-bundle": "2.0.*"
    }
}

Then update your AppKernel.php to register the bundle with:

new Rezzza\ShortyBundle\RezzzaShortyBundle()

Configuration

rezzza_shorty:
    default_provider: google
    providers:
        google:
            id: google
            key: ~
            http_adapter: ~ # default is Rezzza\Shorty\Http\CurlAdapter
        google2:
            id: google
            key: anotherkey
        bitly:
            id: bitly
            access_token: ~ #required
            http_adapter: ~ # default is Rezzza\Shorty\Http\CurlAdapter
        custom:
            id: my_custom_service
        chain:
            id: chain
            providers: [google, bitly, custom, google2]

Basic usage

$shorty = $this->container->get('rezzza.shorty.google');
// or
$shorty = $this->container->get('rezzza.shorty'); // will use default_provider.
try {
    $short  = $shorty->shorten('http://www.verylastroom.net');
    $long   = $shorty->expand($long);
} catch (\Rezzza\Shorty\Exception\Exception $e) {
    // oops ...
}

Exceptions

Exceptions directory.

统计信息

  • 总下载量: 13.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-06-24