Lines Matching refs:this

61         $this->conditionalLength = $value;
63 $this->defaultBreakpoint = $defaultBreakpoint;
69 $this->length = $value;
72 $this->length = $conditionalValue->getValue();
73 $this->breakpoint = $conditionalValue->getBreakpoint();
84 $this->axis = "x";
87 $this->axis = "y";
92 $this->parseAsNumberWithOptionalUnit();
95 $this->parseAsRatio();
114 return $this->unitInLength;
123 switch ($this->unitInLength) {
126 $targetValue = $this->numerator * $remValue;
130 $targetValue = $this->numerator;
138 return $this->numerator;
147 $ratio = $this->getRatio();
151 $colsNumber = floor(GridTag::GRID_TOTAL_COLUMNS * $this->numerator / $this->denominator);
152 $breakpoint = $this->getBreakpointOrDefault();
167 if ($this->numerator === null) {
168 if ($this->getLength() === "auto") {
175 throw new ExceptionBadArgument("A row col class can be calculated only from a number ({$this}) or from the `auto` value");
178 $colsNumber = intval($this->numerator);
181 throw new ExceptionBadArgument("A row col class can be calculated only from a number below $totalColumns ({$this}");
183 $breakpoint = $this->getBreakpointOrDefault();
193 return $this->breakpoint;
200 return $this->length;
206 return $this->conditionalLength;
216 switch ($this->unitInLength){
220 return $this->length;
227 if ($this->numerator !== null) {
228 return $this->toPixelNumber() . "px";
230 if ($this->length === "fit") {
233 return $this->length;
240 if ($this->breakpoint !== null) {
241 return $this->breakpoint;
243 return $this->defaultBreakpoint;
250 return $this->denominator;
263 preg_match("/^([0-9.]+)([^0-9]*)$/i", $this->length, $matches, PREG_OFFSET_CAPTURE);
269 $this->numerator = DataType::toFloat($localNumber);
272 throw new ExceptionBadSyntax("The number value ($localNumber) of the length value ($this->length) is not a valid float format.");
274 $this->denominator = 1;
280 $this->unitInLength = $secondMatch;
281 if ($this->unitInLength === self::PERCENTAGE) {
282 $this->denominator = 100;
293 preg_match("/^([0-9]+):([0-9]+)$/i", $this->length, $matches, PREG_OFFSET_CAPTURE);
299 $this->numerator = DataType::toFloat($numerator);
302 throw new ExceptionBadSyntax("The number value ($numerator) of the length value ($this->length) is not a valid float format.");
306 $this->denominator = DataType::toFloat($denominator);
309 throw new ExceptionBadSyntax("The number value ($denominator) of the length value ($this->length) is not a valid float format.");
311 $this->isRatio = true;
320 if (!$this->isRatio()) {
323 if ($this->numerator == null) {
326 if ($this->denominator == null) {
329 if ($this->denominator == 0) {
330 throw new ExceptionBadArgument("The denominator of the conditional length ($this) is 0. You can't ask a ratio.");
332 return $this->numerator / $this->denominator;
337 return $this->axis;
342 if ($this->axis !== null) {
343 return $this->axis;
350 if ($this->getLengthUnit() === self::PERCENTAGE) {
353 return $this->isRatio;
365 if ($this->breakpoint !== null) {
366 if($this->breakpoint==="xs"){
369 return "-{$this->breakpoint}";