REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 3.54 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/woocommerce/lib/packages/GraphQL/Server/OperationParams.php
Text
Base64
<?php declare(strict_types=1); namespace Automattic\WooCommerce\Vendor\GraphQL\Server; /** * Structure representing parsed HTTP parameters for Automattic\WooCommerce\Vendor\GraphQL operation. * * The properties in this class are not strictly typed, as this class * is only meant to serve as an intermediary representation which is * not yet validated. */ class OperationParams { /** * Id of the query (when using persisted queries). * * Valid aliases (case-insensitive): * - id * - queryId * - documentId * * @api * * @var mixed should be string|null */ public $queryId; /** * A document containing Automattic\WooCommerce\Vendor\GraphQL operations and fragments to execute. * * @api * * @var mixed should be string|null */ public $query; /** * The name of the operation in the document to execute. * * @api * * @var mixed should be string|null */ public $operation; /** * Values for any variables defined by the operation. * * @api * * @var mixed should be array<string, mixed> */ public $variables; /** * Reserved for implementors to extend the protocol however they see fit. * * @api * * @var mixed should be array<string, mixed> */ public $extensions; /** * Executed in read-only context (e.g. via HTTP GET request)? * * @api */ public bool $readOnly; /** * The raw params used to construct this instance. * * @api * * @var array<string, mixed> */ public array $originalInput; /** * Creates an instance from given array. * * @param array<string, mixed> $params * * @api */ public static function create(array $params, bool $readonly = false): OperationParams { $instance = new static(); $params = array_change_key_case($params, \CASE_LOWER); $instance->originalInput = $params; $params += [ 'query' => null, 'queryid' => null, 'documentid' => null, // alias to queryid 'id' => null, // alias to queryid 'operationname' => null, 'variables' => null, 'extensions' => null, ]; foreach ($params as &$value) { if ($value === '') { $value = null; } } $instance->query = $params['query']; $instance->queryId = $params['queryid'] ?? $params['documentid'] ?? $params['id']; $instance->operation = $params['operationname']; $instance->variables = static::decodeIfJSON($params['variables']); $instance->extensions = static::decodeIfJSON($params['extensions']); $instance->readOnly = $readonly; // Apollo server/client compatibility if ( isset($instance->extensions['persistedQuery']['sha256Hash']) && $instance->queryId === null ) { $instance->queryId = $instance->extensions['persistedQuery']['sha256Hash']; } return $instance; } /** * Decodes the value if it is JSON, otherwise returns it unchanged. * * @param mixed $value * * @return mixed */ protected static function decodeIfJSON($value) { if (! is_string($value)) { return $value; } $decoded = json_decode($value, true); if (json_last_error() === \JSON_ERROR_NONE) { return $decoded; } return $value; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Exception
DIR
-
drwxr-xr-x
2026-05-29 02:43:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Helper.php
19.90 KB
lrw-r--r--
2026-05-05 14:26:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OperationParams.php
3.54 KB
lrw-r--r--
2026-05-05 14:26:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RequestError.php
290 B
lrw-r--r--
2026-05-05 14:26:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ServerConfig.php
8.95 KB
lrw-r--r--
2026-05-05 14:26:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StandardServer.php
5.34 KB
lrw-r--r--
2026-05-05 14:26:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).