PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.10
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.10
4.4.10 4.4.9.1 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 All 142 releases
learnpress / vendor / tijsverkoyen / css-to-inline-styles / src / Css / Property / Property.php

Property.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.10, at vendor/tijsverkoyen/css-to-inline-styles/src/Css/Property/Property.php

91 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace TijsVerkoyen\CssToInlineStyles\Css\Property;
4
5 use Symfony\Component\CssSelector\Node\Specificity;
6
7 final class Property
8 {
9 /**
10 * @var string
11 */
12 private $name;
13
14 /**
15 * @var string
16 */
17 private $value;
18
19 /**
20 * @var Specificity|null
21 */
22 private $originalSpecificity;
23
24 /**
25 * Property constructor.
26 * @param string $name
27 * @param string $value
28 * @param Specificity|null $specificity
29 */
30 public function __construct($name, $value, ?Specificity $specificity = null)
31 {
32 $this->name = $name;
33 $this->value = $value;
34 $this->originalSpecificity = $specificity;
35 }
36
37 /**
38 * Get name
39 *
40 * @return string
41 */
42 public function getName()
43 {
44 return $this->name;
45 }
46
47 /**
48 * Get value
49 *
50 * @return string
51 */
52 public function getValue()
53 {
54 return $this->value;
55 }
56
57 /**
58 * Get originalSpecificity
59 *
60 * @return Specificity|null
61 */
62 public function getOriginalSpecificity()
63 {
64 return $this->originalSpecificity;
65 }
66
67 /**
68 * Is this property important?
69 *
70 * @return bool
71 */
72 public function isImportant()
73 {
74 return (stripos($this->value, '!important') !== false);
75 }
76
77 /**
78 * Get the textual representation of the property
79 *
80 * @return string
81 */
82 public function toString()
83 {
84 return sprintf(
85 '%1$s: %2$s;',
86 $this->name,
87 $this->value
88 );
89 }
90 }
91