| Server IP : 217.11.249.137 / Your IP : 216.73.216.64 Web Server : Apache System : FreeBSD triton.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-a3d32f9e6 GENERIC amd64 User : www ( 80) PHP Version : 8.1.32 Disable Function : ini_restore, show_source, socket_select, socket_create_listen, socket_create_pair, socket_listen, socket_strerror, shell_exec, proc_nice, proc_terminate, readlink, symlink, link, pfsocketopen, ini_alter, dl, pcntl_exec, pcntl_fork, pcntl_signal, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifsignaled, pcntl_wifstoped, pcntl_wifstopsig, pcntl_wtermsig, socket_accept, socket_bind, socket_create, socket_create_listen, popen, zlib_decode MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /data/www/26528/proliving_cz/www/wp-content/plugins/amp/src/ |
Upload File : |
<?php
/**
* Abstract class PairedUrlStructure.
*
* @package AmpProject\AmpWP
*/
namespace AmpProject\AmpWP;
/**
* Interface for classes that implement a PairedUrl.
*
* @package AmpProject\AmpWP
* @since 2.1
*/
abstract class PairedUrlStructure {
/**
* Paired URL service.
*
* @var PairedUrl
*/
protected $paired_url;
/**
* PairedUrlStructure constructor.
*
* @param PairedUrl $paired_url Paired URL service.
*/
public function __construct( PairedUrl $paired_url ) {
$this->paired_url = $paired_url;
}
/**
* Determine a given URL is for a paired AMP request.
*
* @param string $url URL (or REQUEST_URI).
* @return bool True if the URL has the paired endpoint.
*/
public function has_endpoint( $url ) {
return $url !== $this->remove_endpoint( $url );
}
/**
* Turn a given URL into a paired AMP URL.
*
* @param string $url URL (or REQUEST_URI).
* @return string AMP URL.
*/
abstract public function add_endpoint( $url );
/**
* Remove the paired AMP endpoint from a given URL.
*
* @param string $url URL (or REQUEST_URI).
* @return string URL with AMP stripped.
*/
abstract public function remove_endpoint( $url );
}