WordPress at a glance
function is not described

WP_REST_Block_Directory_Controller::register_routes() public WP 1.0

Registers the necessary REST API routes.

{} It's a method of the class: WP_REST_Block_Directory_Controller{}

No Hooks.

Return

Null. Nothing.

Usage

$WP_REST_Block_Directory_Controller = new WP_REST_Block_Directory_Controller();
$WP_REST_Block_Directory_Controller->register_routes();

Code of WP_REST_Block_Directory_Controller::register_routes() WP 5.5.1

<?php
public function register_routes() {
	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/search',
		array(
			array(
				'methods'             => WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_items' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
				'args'                => $this->get_collection_params(),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);
}