AtRuleBlockList.php
2 years ago
CSSBlockList.php
4 years ago
CSSList.php
2 years ago
Document.php
8 months ago
KeyFrame.php
2 years ago
index.php
3 years ago
KeyFrame.php
57 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Sabberworm\CSS\CSSList; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Sabberworm\CSS\OutputFormat; |
| 5 | use MailPoetVendor\Sabberworm\CSS\Property\AtRule; |
| 6 | class KeyFrame extends CSSList implements AtRule |
| 7 | { |
| 8 | private $vendorKeyFrame; |
| 9 | private $animationName; |
| 10 | public function __construct($iLineNo = 0) |
| 11 | { |
| 12 | parent::__construct($iLineNo); |
| 13 | $this->vendorKeyFrame = null; |
| 14 | $this->animationName = null; |
| 15 | } |
| 16 | public function setVendorKeyFrame($vendorKeyFrame) |
| 17 | { |
| 18 | $this->vendorKeyFrame = $vendorKeyFrame; |
| 19 | } |
| 20 | public function getVendorKeyFrame() |
| 21 | { |
| 22 | return $this->vendorKeyFrame; |
| 23 | } |
| 24 | public function setAnimationName($animationName) |
| 25 | { |
| 26 | $this->animationName = $animationName; |
| 27 | } |
| 28 | public function getAnimationName() |
| 29 | { |
| 30 | return $this->animationName; |
| 31 | } |
| 32 | public function __toString() |
| 33 | { |
| 34 | return $this->render(new OutputFormat()); |
| 35 | } |
| 36 | public function render(OutputFormat $oOutputFormat) |
| 37 | { |
| 38 | $sResult = $oOutputFormat->comments($this); |
| 39 | $sResult .= "@{$this->vendorKeyFrame} {$this->animationName}{$oOutputFormat->spaceBeforeOpeningBrace()}{"; |
| 40 | $sResult .= $this->renderListContents($oOutputFormat); |
| 41 | $sResult .= '}'; |
| 42 | return $sResult; |
| 43 | } |
| 44 | public function isRootList() |
| 45 | { |
| 46 | return \false; |
| 47 | } |
| 48 | public function atRuleName() |
| 49 | { |
| 50 | return $this->vendorKeyFrame; |
| 51 | } |
| 52 | public function atRuleArgs() |
| 53 | { |
| 54 | return $this->animationName; |
| 55 | } |
| 56 | } |
| 57 |