当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Amf_Request::initialize方法代码示例

本文整理汇总了PHP中Zend_Amf_Request::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Amf_Request::initialize方法的具体用法?PHP Zend_Amf_Request::initialize怎么用?PHP Zend_Amf_Request::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Amf_Request的用法示例。


在下文中一共展示了Zend_Amf_Request::initialize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testAmf0CredentialsInHeader

 /**
  * Test Amf0 credentials sent to the server
  *
  */
 public function testAmf0CredentialsInHeader()
 {
     $myRequest = file_get_contents(dirname(__FILE__) . '/Request/mock/credentialsheaderAmf0.bin');
     // send the mock object request to be deserialized
     $this->_request->initialize($myRequest);
     // Make sure that no headers where recieved
     $this->assertEquals(1, sizeof($this->_request->getAmfHeaders()));
     $requestHeaders = $this->_request->getAmfHeaders();
     $this->assertTrue($requestHeaders[0] instanceof Zend_Amf_Value_MessageHeader);
     $this->assertEquals('Credentials', $requestHeaders[0]->name);
     $this->assertFalse($requestHeaders[0]->mustRead);
     $data = $requestHeaders[0]->data;
     // Check the resulting header
     $this->assertEquals('admin', $data->userid);
     $this->assertEquals('pw123', $data->password);
 }
开发者ID:omusico,项目名称:logica,代码行数:20,代码来源:RequestTest.php

示例2: testResponseHeadersShouldBeSerializedWhenWritingMessage

 public function testResponseHeadersShouldBeSerializedWhenWritingMessage()
 {
     $this->testResponseShouldAggregateMessageHeaders();
     $this->_response->finalize();
     $response = $this->_response->getResponse();
     $request = new Zend_Amf_Request();
     $request->initialize($response);
     $headers = $request->getAmfHeaders();
     $this->assertEquals(2, count($headers));
 }
开发者ID:travisj,项目名称:zf,代码行数:10,代码来源:ResponseTest.php

示例3: stdClass

        curl_setopt($ch, CURLOPT_HEADER, true);
        curl_setopt($ch, CURLOPT_AUTOREFERER, true);
        //curl_setopt($ch, CURLOPT_VERBOSE, true);
        curl_setopt($ch, CURLOPT_URL, $this->amf_gateway);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $this->getHttpPost());
        $this->resp_data = curl_exec($ch);
        curl_close($ch);
    }
}
return;
//for test
/*
 $data['tnd']   = 2;
 $data['session_key'] = 'skvalue';
 $data['pmid']  = 1111;
 //*/
//*
$data = new stdClass();
$data->tnd = 2;
$data->session_key = 'skvalue';
$data->pmid = 1111;
//*/
$myreq = new AmfRequestClient('TestAmf.sendback', $data);
$myreq->doRequest();
echo "Request:\n{$myreq->post_data}\n\nResponse:\n{$myreq->resp_data}\n";
return;
$req = new Zend_Amf_Request();
$req->initialize($sreq);
var_dump($myreq);
var_dump($req);
//$myreq->doRequest();
开发者ID:uning,项目名称:backend_common,代码行数:31,代码来源:AmfRequestClient.php


注:本文中的Zend_Amf_Request::initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。