olegkhuss/verilocationsoapbundle
最新稳定版本:0.3.0
Composer 安装命令:
composer require olegkhuss/verilocationsoapbundle
包简介
Symfony2 bundle for verilocation soap client
README 文档
README
Sample usage
Include in composer.json
{
.....
"require": {
"olegkhuss/verilocationsoapbundle": "~0.2@dev"
}
}
config.yml
gelo_verilocation_soap:
auto_logon: false
username: <username>
password: <password>
wsdl: 'http://www.verilocation.com/gps/xml/version_001.asmx?wsdl'
# SoapClient options see http://php.net/manual/ru/soapclient.soapclient.php
# options: ~
PHP code
<?php
// ...
public function indexAction(Request $request)
{
$client = $this->get('gelo_verilocation_soap.client');
try {
$client->doLogon(
$this->container->getParameter('gelo_verilocation_soap.client.username'),
$this->container->getParameter('gelo_verilocation_soap.client.password')
);
// is webservice active?
print_r($client->isWebserviceActive());
// get all vehicles
print_r($client->getVehicles());
// get all vehicles extended
print_r($client->getVehiclesExt());
// get all latest positions
print_r($client->getLocationsLatest());
} catch (\Exception $e) {
// could not login, check username/password
throw $e;
}
}
if `auto_logon: true`, avoid manual doLogon call
<?php
public function indexAction(Request $request)
{
try {
$client = $this->get('gelo_verilocation_soap.client');
// is webservice active?
print_r($client->isWebserviceActive());
// ...
} catch (\Exception $e) {
// could not login, check username/password
throw $e;
}
}
统计信息
- 总下载量: 65
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-19