Joomla分配数据进行查看

时间:2016-10-06 11:23:04

标签: php joomla controller joomla3.5

我正在研究Joomla 3.6,我是joomla的新手。我从api获取数据,我想将该数据传递给视图。我怎么能这样做。

Controler:user.php

public function profile() {
    $wskey = sdafsda;
    $companycode = 'sdafsd';
    $client = 1;
    $cardno = 'sdafsd';
    $pin = 'sdaf';
    $wsdl = 'http://example/service.asmx?wsdl';

    $getdata = array(
        'WSKey' => $wskey,
        'CompanyCode' => $companycode,
        'CardNo' => $this->EncryptData($cardno),
        'Client' => $client,
        'PIN' => $this->EncryptData($pin),
    );

    $soapClient = new SoapClient($wsdl);

    try {
        $result = $soapClient->GetProfile($getdata);
    } catch (Exception $e) {
        return $e;
    }
}

视图在com_users->views->cprofile中创建。

我想在default.phpcprofile次观看中显示这些数据,并希望了解如何使用数据调用视图。

对不起,可能不太清楚。

0 个答案:

没有答案