Submit
Path:
~
/
/
usr
/
local
/
sitepad
/
editor
/
site-data
/
plugins
/
kkart-pro
/
packages
/
kkart-blocks
/
src
/
StoreApi
/
Routes
/
File Content:
RouteException.php
<?php namespace Automattic\Kkart\Blocks\StoreApi\Routes; /** * ReserveStockRouteExceptionException class. * * @internal This API is used internally by Blocks--it is still in flux and may be subject to revisions. */ class RouteException extends \Exception { /** * Sanitized error code. * * @var string */ public $error_code; /** * Additional error data. * * @var array */ public $additional_data = []; /** * Setup exception. * * @param string $error_code Machine-readable error code, e.g `kkart_invalid_product_id`. * @param string $message User-friendly translated error message, e.g. 'Product ID is invalid'. * @param int $http_status_code Proper HTTP status code to respond with, e.g. 400. * @param array $additional_data Extra data (key value pairs) to expose in the error response. */ public function __construct( $error_code, $message, $http_status_code = 400, $additional_data = [] ) { $this->error_code = $error_code; $this->additional_data = array_filter( (array) $additional_data ); parent::__construct( $message, $http_status_code ); } /** * Returns the error code. * * @return string */ public function getErrorCode() { return $this->error_code; } /** * Returns additional error data. * * @return array */ public function getAdditionalData() { return $this->additional_data; } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
AbstractCartRoute.php
2379 bytes
0644
AbstractRoute.php
8333 bytes
0644
AbstractTermsRoute.php
4776 bytes
0644
Cart.php
1347 bytes
0644
CartAddItem.php
2948 bytes
0644
CartApplyCoupon.php
1882 bytes
0644
CartCoupons.php
3823 bytes
0644
CartCouponsByCode.php
2469 bytes
0644
CartItems.php
3699 bytes
0644
CartItemsByKey.php
3903 bytes
0644
CartRemoveCoupon.php
2261 bytes
0644
CartRemoveItem.php
1721 bytes
0644
CartSelectShippingRate.php
2487 bytes
0644
CartUpdateItem.php
1739 bytes
0644
CartUpdateShipping.php
7330 bytes
0644
Checkout.php
17224 bytes
0644
ProductAttributeTerms.php
1607 bytes
0644
ProductAttributes.php
1390 bytes
0644
ProductAttributesById.php
1679 bytes
0644
ProductCategories.php
1136 bytes
0644
ProductCategoriesById.php
1651 bytes
0644
ProductCollectionData.php
5548 bytes
0644
ProductReviews.php
6618 bytes
0644
ProductTags.php
1118 bytes
0644
Products.php
12968 bytes
0644
ProductsById.php
1593 bytes
0644
RouteException.php
1393 bytes
0644
RouteInterface.php
551 bytes
0644
N4ST4R_ID | Naxtarrr