Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

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