定制 h4cc/pheanstalk-bundle-extra 二次开发

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

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

h4cc/pheanstalk-bundle-extra

Composer 安装命令:

composer require h4cc/pheanstalk-bundle-extra

包简介

Additional classes for the LeezyPheanstalkBundle.

README 文档

README

Build Status Scrutinizer Quality Score Code Coverage HHVM Status

h4cc/LeezyPheanstalkBundleExtra

Some extra classes to work with LeezyPheanstalkBundle.

This package currently contains:

  • PrefixedTubePheanstalkProxy - A Pheanstalk Proxy for adding a Prefix to all used tubes.

Installation

Installing this package can be done with the following command:

php composer.phar require h4cc/pheanstalk-bundle-extra:dev-master

Hint: Use a more stable version if available!

PrefixedTubePheanstalkProxy

This Proxy is abled to prefix all tubes with a given string.

New Methods are:

PrefixedTubePheanstalkProxy
    - setTubePrefix($prefix);
    - getTubePrefix();

Using a custom Proxy in Symfony2

Define the the proxy as a service:

services.xml

<service id="your_app.pheanstalk.proxy" class="h4cc\LeezyPheanstalkBundleExtra\Proxy\PrefixedTubePheanstalkProxy">
    <call method="setTubePrefix">
        <argument>your_app_</argument>
    </call>
</service>

or

services.yml

services:
    your_app.pheanstalk.proxy:
        class: "h4cc\LeezyPheanstalkBundleExtra\Proxy\PrefixedTubePheanstalkProxy"
        calls:
            - [ setTubePrefix, [ "your_app_" ] ]

Activate the proxy in the app/config/config.yml like this:

leezy_pheanstalk:
    enabled: true
    pheanstalks:
        primary:
            server: 127.0.0.1
            port: 11300
            timeout: 60
            default: true
            proxy: your_app.pheanstalk.proxy

A cleaner way would be to define the TubePrefix String as a Parameter.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-12-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固