-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
class FPImage extends Image { | ||
|
||
public function Fill($width, $height) { | ||
return $this->FocusFill($width, $height); | ||
} | ||
|
||
public function FillMax($width, $height) { | ||
return $this->FocusFillMax($width, $height); | ||
} | ||
|
||
public function CropWidth($width) { | ||
return $this->FocusCropWidth($width); | ||
} | ||
|
||
public function CropHeight($height) { | ||
return $this->FocusCropHeight($height); | ||
} | ||
} | ||
|
||
/* | ||
// This is required to ensure manipulated images get their methods overidden too, | ||
// but it doesn't work because Image_cached isn't compatible with the injector. | ||
// Not having this in place means chained method chaining doesn't work properly | ||
// e.g. `$Image.ScaleHeight(200).CropWidth(200)` will not use $FocusCropWidth. | ||
class FPImage_cached extends Image_cached { | ||
public function Fill($width, $height) { | ||
return $this->FocusFill($width, $height); | ||
} | ||
public function FillMax($width, $height) { | ||
return $this->FocusFillMax($width, $height); | ||
} | ||
public function CropWidth($width) { | ||
return $this->FocusCropWidth($width); | ||
} | ||
public function CropHeight($height) { | ||
return $this->FocusCropHeight($height); | ||
} | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters