HEX
Server: LiteSpeed
System: Linux s166.bitcommand.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: h340499 (1922)
PHP: 8.2.16
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/h340499/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/Base.php
<?php

namespace WPML\Rest;

use IWPML_Action;

abstract class Base implements ITarget, IWPML_Action {

	/** @var Adaptor */
	private $adaptor;

	public function __construct( Adaptor $adaptor ) {
		$this->adaptor = $adaptor;
		$adaptor->set_target( $this );
	}

	/**
	 * @return string
	 */
	abstract public function get_namespace();

	public function add_hooks() {
		$this->adaptor->add_hooks();
	}

	/**
	 * @return array
	 */
	public static function getStringType() {
		return [
			'type'              => 'string',
			'sanitize_callback' => 'WPML_REST_Arguments_Sanitation::string',
		];
	}

	/**
	 * @return array
	 */
	public static function getIntType() {
		return [
			'type'              => 'int',
			'validate_callback' => 'WPML_REST_Arguments_Validation::integer',
			'sanitize_callback' => 'WPML_REST_Arguments_Sanitation::integer',
		];
	}
}