HEX
Server: Apache
System: Linux webm006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/laretediclo/wp-content/plugins/pods/src/Pods/REST/V1/Main.php
<?php

namespace Pods\REST\V1;

use Pods\REST\Abstracts\Main_Abstract;

/**
 * Class Main
 *
 * The main entry point for the REST API.
 *
 * This class should not contain business logic and merely set up and start the REST API support.
 *
 * @since 2.8.0
 */
class Main extends Main_Abstract {

	/**
	 * REST API URL prefix.
	 *
	 * This prefix is appended to the REST API URL ones.
	 *
	 * @var string
	 */
	protected $url_prefix = '/pods/v1';

	/**
	 * REST API URL prefix.
	 *
	 * This prefix is appended to the REST API URL ones.
	 *
	 * @var string
	 */
	protected $namespace = 'pods';

	/**
	 * @var array
	 */
	protected $registered_endpoints = [];

	/**
	 * Returns the semantic version for REST API
	 *
	 * @since 2.8.0
	 *
	 * @return string
	 */
	public function get_semantic_version() {
		return '1.0.0';
	}

	/**
	 * Returns the string indicating the REST API version.
	 *
	 * @since 2.8.0
	 *
	 * @return string
	 */
	public function get_version() {
		return 'v1';
	}

	/**
	 * Returns the Pods REST API namespace string that hsould be used to register a route.
	 *
	 * @since 2.8.0
	 *
	 * @return string
	 */
	public function get_pods_route_namespace() {
		return $this->get_namespace() . '/' . $this->get_version();
	}

	/**
	 * Returns the REST API URL prefix that will be appended to the namespace.
	 *
	 * The prefix should be in the `/some/path` format.
	 *
	 * @since 2.8.0
	 *
	 * @return string
	 */
	protected function url_prefix() {
		return $this->url_prefix;
	}

	/**
	 * {@inheritDoc}
	 *
	 * @since 2.8.0
	 */
	public function get_reference_url() {
		return esc_url( 'https://docs.pods.io/' );
	}

}