Exemplo n.º 1
0
 /**
  * String multiplication.
  * this is repeated other times
  * @param sassNumber $other the number of times to repeat this
  * @return sassString the string result
  */
 public function op_times($other)
 {
     if (!$other instanceof SassNumber || !$other->isUnitless()) {
         throw new SassStringException('Value must be a unitless number', SassScriptParser::$context->node);
     }
     $this->value = str_repeat($this->value, $other->value);
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Colour bitwise Shift Right
  * @param sassNumber $other amount to shift right by
  * @return sassColour the colour result
  */
 public function op_shiftr($other)
 {
     if (!$other instanceof SassNumber || !$other->isUnitless()) {
         throw new SassColourException('Number must be a unitless number', SassScriptParser::$context->node);
     }
     $this->red = $this->getRed() >> $other->value;
     $this->green = $this->getGreen() >> $other->value;
     $this->blue = $this->getBlue() >> $other->value;
     return $this;
 }