graze/wipotec-checkweigher-client
最新稳定版本:v1.2.3
Composer 安装命令:
composer require graze/wipotec-checkweigher-client
包简介
Wipotec checkweigher client written in PHP
README 文档
README
Wipotec checkweigher client written in PHP.
Install
Via Composer
$ composer require graze/wipotec-checkweigher-client
Usage
Instantiating a client
Use the factory method to return a Client instance:
$client = \Graze\WipotecCheckweigherClient\Client::factory(); ...
Sending requests
Connect to the remote checkweigher using the connect method:
... $dsn = '127.0.0.1:55001'; $client->connect($dsn); ...
Once connected, the sendRequest method can be used to send requests to the checkweigher:
... $request = new \Graze\WipotecCheckweigherClient\Request\RequestSetArticle(); $request->setArticleParam(Parameter::NAME, $articleName); $request->setArticleParam(Parameter::NUMBER, $articleNumber); $response = $client->sendRequest($request); ...
Responses
If a corresponding response class exists (in \Graze\Wipotec\Response\) for a request then it will be used, otherwise the ResponseGeneric will be returned.
All responses have the following methods:
/** * Whether an error was returned. * * @return bool */ public function hasError(); /** * Get the error message. * * @return string */ public function getError(); /** * Get the raw response as an array. * * @return mixed[] */ public function getContents();
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
make build test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email security@graze.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 17.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-13