REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.09 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/woocommerce/src/Internal/Api/GraphQLEndpointRegistrar.php
Text
Base64
<?php declare(strict_types=1); namespace Automattic\WooCommerce\Internal\Api; /** * Deferred-registration helper for GraphQL endpoints declared via * {@see Main::register_graphql_endpoint()}. * * Each instance captures the arguments of a single registration request and * exposes {@see self::handle_rest_api_init()} as the callback target for the * rest_api_init action, so Main doesn't have to carry per-registration state * through a closure. */ class GraphQLEndpointRegistrar { /** * Capture the arguments of a single register_graphql_endpoint() call. * * @param string $controller_class_name Fully-qualified name of a concrete GraphQLController subclass. * @param string $route_namespace REST namespace passed to register_rest_route(). * @param string $route REST route path passed to register_rest_route(). * @param string[] $methods HTTP methods accepted on the endpoint. */ public function __construct( private readonly string $controller_class_name, private readonly string $route_namespace, private readonly string $route, private readonly array $methods ) {} /** * Hook callback for rest_api_init. Instantiates the controller and * registers the REST route. * * The caller-declared methods are narrowed by * {@see Main::filter_methods_against_settings()} so plugin endpoints honour * the same site-wide settings (e.g. the GET-endpoint toggle) as * WooCommerce core's `/wc/graphql`. If the filter empties the list the * endpoint is not registered. */ public function handle_rest_api_init(): void { $methods = Main::filter_methods_against_settings( $this->methods ); if ( empty( $methods ) ) { return; } $controller = Main::instantiate_graphql_controller( $this->controller_class_name ); if ( null === $controller ) { return; } register_rest_route( $this->route_namespace, $this->route, array( 'methods' => $methods, 'callback' => array( $controller, 'handle_request' ), // Auth is handled per-query/mutation. 'permission_callback' => '__return_true', ) ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Autogenerated
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
Schema
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
GraphQLController.php
21.50 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
GraphQLEndpointRegistrar.php
2.09 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
Main.php
12.55 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
QueryCache.php
4.68 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
QueryInfoExtractor.php
7.14 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
Settings.php
2.06 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
Utils.php
7.68 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).