class OperationResult in Payment 8.2
Provides an operation result.
Hierarchy
- class \Drupal\payment\OperationResult implements OperationResultInterface
Expanded class hierarchy of OperationResult
4 files declare their use of OperationResult
- OperationResultTest.php in tests/
src/ Unit/ OperationResultTest.php - PaymentMethodBase.php in src/
Plugin/ Payment/ Method/ PaymentMethodBase.php - PaymentTestResponse.php in modules/
payment_test/ src/ Plugin/ Payment/ Method/ PaymentTestResponse.php - Unavailable.php in src/
Plugin/ Payment/ Method/ Unavailable.php
File
- src/
OperationResult.php, line 10
Namespace
Drupal\paymentView source
class OperationResult implements OperationResultInterface {
/**
* The response.
*
* @var \Drupal\payment\Response\ResponseInterface|null
*/
protected $response;
/**
* Creates a new instance.
*
* @param \Drupal\payment\Response\ResponseInterface|null $response
* A response or NULL if the operation is completed.
*/
public function __construct(ResponseInterface $response = NULL) {
$this->response = $response;
}
/**
* {@inheritdoc}
*/
public function isCompleted() {
return is_null($this->response);
}
/**
* {@inheritdoc}
*/
public function getCompletionResponse() {
return $this->response;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OperationResult:: |
protected | property | The response. | |
OperationResult:: |
public | function |
Gets the response to complete the operation. Overrides OperationResultInterface:: |
|
OperationResult:: |
public | function |
Gets whether the operation is completed. Overrides OperationResultInterface:: |
|
OperationResult:: |
public | function | Creates a new instance. |