-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathDeclarationList.php
More file actions
77 lines (60 loc) · 2.31 KB
/
Copy pathDeclarationList.php
File metadata and controls
77 lines (60 loc) · 2.31 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
declare(strict_types=1);
namespace Sabberworm\CSS\RuleSet;
use Sabberworm\CSS\Property\Declaration;
/**
* Represents a CSS item that contains `Declaration`s, defining the methods to manipulate them.
*/
interface DeclarationList
{
public function addDeclaration(Declaration $declarationToAdd, ?Declaration $sibling = null): void;
public function removeDeclaration(Declaration $declarationToRemove): void;
public function removeMatchingDeclarations(string $searchPattern): void;
public function removeAllDeclarations(): void;
/**
* @param array<Declaration> $declarations
*/
public function setDeclarations(array $declarations): void;
/**
* @return array<int<0, max>, Declaration>
*/
public function getDeclarations(?string $searchPattern = null): array;
/**
* @return array<string, Declaration>
*/
public function getDeclarationsAssociative(?string $searchPattern = null): array;
/**
* @deprecated in v9.2, will be removed in v10.0; use `addDeclaration()` instead.
*/
public function addRule(Declaration $declarationToAdd, ?Declaration $sibling = null): void;
/**
* @deprecated in v9.2, will be removed in v10.0; use `removeDeclaration()` instead.
*/
public function removeRule(Declaration $declarationToRemove): void;
/**
* @deprecated in v9.2, will be removed in v10.0; use `removeMatchingDeclarations()` instead.
*/
public function removeMatchingRules(string $searchPattern): void;
/**
* @deprecated in v9.2, will be removed in v10.0; use `removeAllDeclarations()` instead.
*/
public function removeAllRules(): void;
/**
* @param array<Declaration> $declarations
*
* @deprecated in v9.2, will be removed in v10.0; use `setDeclarations()` instead.
*/
public function setRules(array $declarations): void;
/**
* @return array<int<0, max>, Declaration>
*
* @deprecated in v9.2, will be removed in v10.0; use `getDeclarations()` instead.
*/
public function getRules(?string $searchPattern = null): array;
/**
* @return array<string, Declaration>
*
* @deprecated in v9.2, will be removed in v10.0; use `getDeclarationsAssociative()` instead.
*/
public function getRulesAssoc(?string $searchPattern = null): array;
}