WordPress at a glance
function is not described

WP_REST_Autosaves_Controller::__construct() public WP 5.0.0

Constructor.

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

No Hooks.

Return

Null. Nothing.

Usage

$WP_REST_Autosaves_Controller = new WP_REST_Autosaves_Controller();
$WP_REST_Autosaves_Controller->__construct( $parent_post_type );
$parent_post_type(string) (required)
Post type of the parent.

Changelog

Since 5.0.0 Introduced.

Code of WP_REST_Autosaves_Controller::__construct() WP 5.5.1

<?php
public function __construct( $parent_post_type ) {
	$this->parent_post_type = $parent_post_type;
	$post_type_object       = get_post_type_object( $parent_post_type );
	$parent_controller      = $post_type_object->get_rest_controller();

	if ( ! $parent_controller ) {
		$parent_controller = new WP_REST_Posts_Controller( $parent_post_type );
	}

	$this->parent_controller    = $parent_controller;
	$this->revisions_controller = new WP_REST_Revisions_Controller( $parent_post_type );
	$this->rest_namespace       = 'wp/v2';
	$this->rest_base            = 'autosaves';
	$this->parent_base          = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name;
}