1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?php /** * * This file is part of Aura for PHP. * * @license http://opensource.org/licenses/bsd-license.php BSD * */ namespace Aura\Accept\Charset;
use Aura\Accept\AbstractValue;
/** * * Represents an acceptable charset value. * * @package Aura.Accept * */ class CharsetValue extends AbstractValue { /** * * Checks if an available charset value matches this acceptable value. * * @param Charset $avail An available charset value. * * @return True on a match, false if not. * */ public function match(CharsetValue $avail) { if ($avail->getValue() == '*') { return true; }
return strtolower($this->value) == strtolower($avail->getValue()) && $this->matchParameters($avail); } }
|