Heray-Was-Here
Server : Apache
System : Linux hybrid3195.ca.ns.planethoster.net 3.10.0-1160.119.1.el7.tuxcare.els19.x86_64 #1 SMP Mon Mar 31 17:29:00 UTC 2025 x86_64
User : alliancerealtynb ( 1004)
PHP Version : 7.4.33
Disable Function : noop
Directory :  /home/alliancerealtynb/sitepress-multilingual-cmsOLDOLD/classes/API/REST/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/alliancerealtynb/sitepress-multilingual-cmsOLDOLD/classes/API/REST/Adaptor.php
<?php

namespace WPML\Rest;

use \WP_REST_Request;

class Adaptor extends \WPML_REST_Base {

	/** @var ITarget $target */
	private $target;

	public function set_target( ITarget $target ) {
		$this->target    = $target;
		$this->namespace = $target->get_namespace();
	}

	public function add_hooks() {
		$routes = $this->target->get_routes();
		foreach ( $routes as $route ) {
			$this->register_route( $route['route'], $route['args'] );
		}
	}

	/**
	 * @param WP_REST_Request $request
	 *
	 * @return array
	 */
	public function get_allowed_capabilities( WP_REST_Request $request ) {
		return $this->target->get_allowed_capabilities( $request );
	}


}

Hry