Lines Matching refs:this

57             $ratio = $this->getRequestedAspectRatio();
64 $requestedWidth = $this->getRequestedWidth();
71 $requestedHeight = $this->getRequestedHeight();
82 $url->addQueryParameter(FetcherImage::TOK, $this->getTok());
103 if (!($this instanceof IFetcherLocalImage)) {
107 $requestedWidth = $this->getRequestedWidth();
112 $requestedHeight = $this->getRequestedHeight();
119 $id = $this->getSourcePath()->toWikiPath()->getWikiId();
146 $this->setRequestedWidth($requestedWidthInt);
159 $this->setRequestedHeight($requestedHeightInt);
165 $this->setRequestedAspectRatio($requestedRatio);
171 return $this;
210 return $this->getIntrinsicWidth() / $this->getIntrinsicHeight();
229 return $this->getTargetWidth() / $this->getTargetHeight();
251 if ($this->requestedRatioAsFloat !== null) {
252 return $this->requestedRatioAsFloat;
259 return $this->getRequestedWidth() / $this->getRequestedHeight();
283 $targetRatio = $this->getTargetAspectRatio();
285 LogUtility::msg("Unable to check the target ratio because it returns this error: {$e->getMessage()}");
304 LogUtility::msg("Internal Error: The width ($width) and height ($height) calculated for the image ($this) does not pass the ratio test. They have a ratio of ($imgTagRatio) while the target dimension ratio is ($targetRatio)");
328 return $this->getRequestedHeight();
337 $width = $this->getRequestedWidth();
339 $ratio = $this->getCalculatedRequestedAspectRatioAsFloat();
341 $ratio = $this->getIntrinsicAspectRatio();
353 $ratio = $this->getCalculatedRequestedAspectRatioAsFloat();
354 [$croppedWidth, $croppedHeight] = $this->getCroppingDimensionsWithRatio($ratio);
360 return $this->getIntrinsicHeight();
378 return $this->getRequestedWidth();
387 $height = $this->getRequestedHeight();
389 $ratio = $this->getCalculatedRequestedAspectRatioAsFloat();
391 $ratio = $this->getIntrinsicAspectRatio();
403 $ratio = $this->getCalculatedRequestedAspectRatioAsFloat();
404 [$logicalWidthWithRatio, $logicalHeightWithRatio] = $this->getCroppingDimensionsWithRatio($ratio);
410 return $this->getIntrinsicWidth();
420 if ($this->requestedWidth === null) {
423 if ($this->requestedWidth === 0) {
426 return $this->requestedWidth;
435 if ($this->requestedHeight === null) {
438 if ($this->requestedHeight === 0) {
441 return $this->requestedHeight;
453 * And this is also ask by the specification
480 $logicalWidth = $this->getIntrinsicWidth();
481 $logicalHeight = $this->round($logicalWidth / $targetRatio);
482 if ($logicalHeight > $this->getIntrinsicHeight()) {
486 $logicalHeight = $this->getIntrinsicHeight();
487 $logicalWidth = $this->round($targetRatio * $logicalHeight);
496 $this->requestedWidth = $requestedWidth;
497 return $this;
502 $this->requestedHeight = $requestedHeight;
503 return $this;
511 $this->requestedRatio = $requestedRatio;
512 $this->requestedRatioAsFloat = Dimension::convertTextualRatioToNumber($requestedRatio);
513 return $this;
519 return get_class($this);
526 $this->getRequestedHeight();
536 $this->getCalculatedRequestedAspectRatioAsFloat();
550 if ($this->requestedRatio === null) {
553 return $this->requestedRatio;
558 if ($this->requestedHeight !== null && $this->requestedWidth !== null) {
561 if ($this->requestedRatio != null) {