public function SassScriptOperation::__construct in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/script/SassScriptOperation.php \SassScriptOperation::__construct()
SassScriptOperation constructor
Parameters
mixed string: operator symbol; array: operator token:
Return value
File
- phpsass/
script/ SassScriptOperation.php, line 85
Class
- SassScriptOperation
- SassScriptOperation class. The operation to perform. @package PHamlP @subpackage Sass.script
Code
public function __construct($operation) {
if (is_string($operation)) {
$operation = self::$operators[$operation];
}
$this->operator = $operation[0];
if (isset($operation[1])) {
$this->associativity = $operation[1];
$this->precedence = $operation[2];
$this->operandCount = isset($operation[3]) ? $operation[3] : null;
}
}