File "REST.php"

Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/better-wp-security/core/modules/two-factor/REST/REST.php
File size: 480 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace iThemesSecurity\TwoFactor\REST;

use iThemesSecurity\Contracts\Runnable;

class REST implements Runnable {

	private $controllers;

	public function __construct( \WP_REST_Controller ...$controllers ) { $this->controllers = $controllers; }

	public function run() {
		add_action( 'rest_api_init', [ $this, 'register_routes' ] );
	}

	public function register_routes() {
		foreach ( $this->controllers as $controller ) {
			$controller->register_routes();
		}
	}
}