Created
May 19, 2016 06:45
-
-
Save virbo/cd63dce883c6ad0a9e256d85fd60c35c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace app\models; | |
use Yii; | |
use yii\base\Model; | |
use Esyst\Nusoap\NusoapClient; | |
/** | |
* Soap Module | |
* | |
* @author Yusuf Ayuba | |
* @copyright 2016 | |
* @link http://dutainformasi.net | |
*/ | |
class Soapmodel extends Model | |
{ | |
protected $wsdl; | |
public function __construct() | |
{ | |
parent::__construct(); | |
$this->wsdl = new NusoapClient("http://localhost:8082/ws/live.php?wsdl", true); | |
} | |
public function token($username,$password) | |
{ | |
return $this->wsdl->call('GetToken',[ | |
'username' => $username, | |
'password' => $password | |
]); | |
} | |
public function listtable($token) | |
{ | |
return $this->wsdl->call('ListTable',[ | |
'token' => $token | |
]); | |
} | |
public function dictionary($token,$tabel) | |
{ | |
return $this->wsdl->call('GetDictionary', [ | |
'token' => $token, | |
'table' => $tabel | |
]); | |
} | |
public function recordset($token, $table, $filter, $order, $limit, $offset) { | |
return $this->wsdl->call('GetRecordset',[ | |
'token' => $token, | |
'table' => $table, | |
'filter' => $filter, | |
'order' => $order, | |
'limit' => $limit, | |
'offset' => $offset | |
]); | |
} | |
public function record($token, $table, $filter) { | |
return $this->wsdl->call('GetRecord', [ | |
'token' => $token, | |
'table' => $table, | |
'filter' => $filter | |
]); | |
} | |
} | |
//location app\models\Soapmodel.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment