PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.0.4
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.0.4
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / back / Libraries / Sabberworm / CSS / src / CSSList / KeyFrame.php

KeyFrame.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.0.4, at back/Libraries/Sabberworm/CSS/src/CSSList/KeyFrame.php

88 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace AcyMailing\Libraries\Sabberworm\CSS\CSSList;
6
7 use AcyMailing\Libraries\Sabberworm\CSS\OutputFormat;
8 use AcyMailing\Libraries\Sabberworm\CSS\Property\AtRule;
9
10 class KeyFrame extends CSSList implements AtRule
11 {
12 /**
13 * @var non-empty-string
14 */
15 private $vendorKeyFrame = 'keyframes';
16
17 /**
18 * @var non-empty-string
19 */
20 private $animationName = 'none';
21
22 /**
23 * @param non-empty-string $vendorKeyFrame
24 */
25 public function setVendorKeyFrame(string $vendorKeyFrame): void
26 {
27 $this->vendorKeyFrame = $vendorKeyFrame;
28 }
29
30 /**
31 * @return non-empty-string
32 */
33 public function getVendorKeyFrame(): string
34 {
35 return $this->vendorKeyFrame;
36 }
37
38 /**
39 * @param non-empty-string $animationName
40 */
41 public function setAnimationName(string $animationName): void
42 {
43 $this->animationName = $animationName;
44 }
45
46 /**
47 * @return non-empty-string
48 */
49 public function getAnimationName(): string
50 {
51 return $this->animationName;
52 }
53
54 /**
55 * @return non-empty-string
56 */
57 public function render(OutputFormat $outputFormat): string
58 {
59 $formatter = $outputFormat->getFormatter();
60 $result = $formatter->comments($this);
61 $result .= "@{$this->vendorKeyFrame} {$this->animationName}{$formatter->spaceBeforeOpeningBrace()}{";
62 $result .= $this->renderListContents($outputFormat);
63 $result .= '}';
64 return $result;
65 }
66
67 public function isRootList(): bool
68 {
69 return false;
70 }
71
72 /**
73 * @return non-empty-string
74 */
75 public function atRuleName(): string
76 {
77 return $this->vendorKeyFrame;
78 }
79
80 /**
81 * @return non-empty-string
82 */
83 public function atRuleArgs(): string
84 {
85 return $this->animationName;
86 }
87 }
88