PHPackages                             phptars/tars-assistant - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phptars/tars-assistant

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phptars/tars-assistant
======================

phpassistant for tars client

v0.2.1(8y ago)3607[1 issues](https://github.com/yuewenweb/tarsAssistant/issues)MITPHPPHP &gt;=5.3

Since Jul 17Pushed 8y ago2 watchersCompare

[ Source](https://github.com/yuewenweb/tarsAssistant)[ Packagist](https://packagist.org/packages/phptars/tars-assistant)[ RSS](/packages/phptars-tars-assistant/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)DependenciesVersions (9)Used By (0)

phptars/tars-assistant
======================

[](#phptarstars-assistant)

phptars是一个用于调用tars服务的php帮助类，其中对phptars扩展中的打包解包和网络收发进行了封装。

使用方式
----

[](#使用方式)

1. 使用phpstorm的同学,请访问[https://github.com/yuewenweb/tars-ide-helper,下载并引入到phpstorm的依赖库中,即可获得php扩展中的函数和代码的自动提示](https://github.com/yuewenweb/tars-ide-helper,%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%BC%95%E5%85%A5%E5%88%B0phpstorm%E7%9A%84%E4%BE%9D%E8%B5%96%E5%BA%93%E4%B8%AD,%E5%8D%B3%E5%8F%AF%E8%8E%B7%E5%BE%97php%E6%89%A9%E5%B1%95%E4%B8%AD%E7%9A%84%E5%87%BD%E6%95%B0%E5%92%8C%E4%BB%A3%E7%A0%81%E7%9A%84%E8%87%AA%E5%8A%A8%E6%8F%90%E7%A4%BA)
2. 将example.tars文件放入与tars2php同级文件夹
3. 执行php tars2php.php example.tars "App.Server.Servant",其后后两个参数分别为tars文件的文件名和tars服务的servantName
4. 在composer.json中指定require类库:

```
    "phptars/tars-assistant" : "vx.x.x"

```

4. 执行composer install命令安装类库,此时会出现vendor目录
5. 开始写业务代码

```
