1 | <?php |
||
20 | final class ContentTypeConstraint extends Constraint |
||
21 | { |
||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | private $allowedTypes; |
||
26 | |||
27 | /** |
||
28 | * @param array $allowedTypes |
||
29 | */ |
||
30 | 5 | public function __construct(array $allowedTypes) |
|
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | 5 | protected function matches($other) |
|
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | 1 | public function toString() |
|
52 | |||
53 | /** |
||
54 | * @param string $type |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | 5 | private static function stripParams($type) |
|
62 | } |
||
63 |