Gemini Protocol library for PHP 8
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
553 B

4 years ago
<?php
namespace TitanII;
/**
* Gemini Request
*/
class Request {
/**
* Maximum length in bytes of the URL request.
*/
const MAX_LENGTH = 1024;
/**
* URL string.
*
* @var string
*/
private string $url;
4 years ago
4 years ago
/**
* @param string Incoming URL request.
*/
public function __construct(string $url)
{
$this->url = substr($url, 0, self::MAX_LENGTH);
}
4 years ago
/**
* Magic method.
*/
public function __toString(): string
{
return $this->url;
}
4 years ago
}