1<?php
2
3namespace PhpCss\Ast\Selector\Simple {
4
5  use PhpCss\Ast;
6
7  class Attribute extends Ast\Selector\Simple {
8
9    public const MATCH_EXISTS = 0;
10    public const MATCH_PREFIX = 1;
11    public const MATCH_SUFFIX = 2;
12    public const MATCH_SUBSTRING = 3;
13    public const MATCH_EQUALS = 4;
14    public const MATCH_INCLUDES = 5;
15    public const MATCH_DASHMATCH = 6;
16
17    public $name = '';
18    public $match = self::MATCH_EXISTS;
19    public $literal;
20
21    public function __construct(
22      string $name = '', int $match = self::MATCH_EXISTS, Ast\Value\Literal $literal = NULL
23    ) {
24      $this->name = $name;
25      $this->match = $match;
26      $this->literal = $literal ?? new Ast\Value\Literal('');
27    }
28  }
29}
30