| Server IP : 46.105.57.169 / Your IP : 216.73.216.144 Web Server : Apache System : Linux webd003.cluster120.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : maitricfuz ( 93378) PHP Version : 8.4.10 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/maitricfuz/www/maitric/libraries/vendor/willdurand/negotiation/src/Negotiation/ |
Upload File : |
<?php
namespace Negotiation;
use Negotiation\Exception\InvalidMediaType;
final class Accept extends BaseAccept implements AcceptHeader
{
private $basePart;
private $subPart;
public function __construct($value)
{
parent::__construct($value);
if ($this->type === '*') {
$this->type = '*/*';
}
$parts = explode('/', $this->type);
if (count($parts) !== 2 || !$parts[0] || !$parts[1]) {
throw new InvalidMediaType();
}
$this->basePart = $parts[0];
$this->subPart = $parts[1];
}
/**
* @return string
*/
public function getSubPart()
{
return $this->subPart;
}
/**
* @return string
*/
public function getBasePart()
{
return $this->basePart;
}
}