konstantin-kuklin/handlersocket-bundle

用于支持HandlerSocket的Symfony包

0.02 2014-07-31 18:41 UTC

This package is not auto-updated.

Last update: 2024-09-24 01:51:17 UTC


README

此包允许你在Symfony2项目中使用HandlerSocket。

安装

  • 在composer.json中添加以下行 "konstantin-kuklin/handlersocket-bundle": "dev-master"

  • 在AppKernel.php中添加以下行 new KonstantinKuklin\HandlerSocketBundle\HandlerSocketBundle()

  • 添加到你的配置文件

hs:
    reader:
        host: localhost
        port: 9998
        debug: "%kernel.debug%"
        auth_key: "Password_Read1"

    writer:
        host: localhost
        port: 9999
        debug: "%kernel.debug%"

如何使用

现在HS Reader和Writer都可通过Symfony DI获取

/** @var \HS\Reader $reader */
$reader = $this->get("hs_reader");

/** @var \HS\Writer $writer */
$writer = $this->get("hs_writer");

关于查询和更详细的HandlerSocket信息,请参阅(https://github.com/KonstantinKuklin/HandlerSocketLibrary)。

如何调试

此外,HS调试信息也可在symfony网络控制台中查看

带有HS的symfony网络控制台

Symfony2 web console

HS页面在分析器中

HS on profile

带有详细输出信息的HS页面在分析器中

HS Detailed