vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* Abstract Request
*/
namespace Omnipay\Common\Message;
use Guzzle\Http\ClientInterface;
use Omnipay\Common\CreditCard;
use Omnipay\Common\Currency;
use Omnipay\Common\Exception\InvalidRequestException;
use Omnipay\Common\Exception\RuntimeException;
use Omnipay\Common\Helper;
use Omnipay\Common\ItemBag;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request as HttpRequest;
use InvalidArgumentException;
/**
* Abstract Request
*
* This abstract class implements RequestInterface and defines a basic
* set of functions that all Omnipay Requests are intended to include.
*
* Requests of this class are usually created using the createRequest
* function of the gateway and then actioned using methods within this
* class or a class that extends this class.
*
* Example -- creating a request:
*
* <code>
* class MyRequest extends \Omnipay\Common\Message\AbstractRequest {};
*
* class MyGateway extends \Omnipay\Common\AbstractGateway {
* function myRequest($parameters) {
* $this->createRequest('MyRequest', $parameters);
* }
* }
*
* // Create the gateway object
* $gw = Omnipay::create('MyGateway');
*
* // Create the request object
* $myRequest = $gw->myRequest($someParameters);
* </code>
*
* Example -- validating and sending a request:
*
* <code>
* try {
* $myRequest->validate();
* $myResponse = $myRequest->send();
* } catch (InvalidRequestException $e) {
* print "Something went wrong: " . $e->getMessage() . "\n";
* }
* // now do something with the $myResponse object, test for success, etc.
* </code>
*
* @see RequestInterface
* @see AbstractResponse
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。