|
@@ 484-494 (lines=11) @@
|
| 481 |
|
|
| 482 |
|
// -- the below methods are just used for unit testing the URL generation code |
| 483 |
|
// |
| 484 |
|
static function get_letterbox_file_url($url, $w, $h, $color) { |
| 485 |
|
$au = self::analyze_url($url); |
| 486 |
|
$op = new TimberImageOperationLetterbox($w, $h, $color); |
| 487 |
|
$new_url = self::_get_file_url( |
| 488 |
|
$au['base'], |
| 489 |
|
$au['subdir'], |
| 490 |
|
$op->filename($au['filename'], $au['extension']), |
| 491 |
|
$au['absolute'] |
| 492 |
|
); |
| 493 |
|
return $new_url; |
| 494 |
|
} |
| 495 |
|
public static function get_letterbox_file_path($url, $w, $h, $color ) { |
| 496 |
|
$au = self::analyze_url($url); |
| 497 |
|
$op = new TimberImageOperationLetterbox($w, $h, $color); |
|
@@ 495-504 (lines=10) @@
|
| 492 |
|
); |
| 493 |
|
return $new_url; |
| 494 |
|
} |
| 495 |
|
public static function get_letterbox_file_path($url, $w, $h, $color ) { |
| 496 |
|
$au = self::analyze_url($url); |
| 497 |
|
$op = new TimberImageOperationLetterbox($w, $h, $color); |
| 498 |
|
$new_path = self::_get_file_path( |
| 499 |
|
$au['base'], |
| 500 |
|
$au['subdir'], |
| 501 |
|
$op->filename($au['filename'], $au['extension']) |
| 502 |
|
); |
| 503 |
|
return $new_path; |
| 504 |
|
} |
| 505 |
|
static function get_resize_file_url($url, $w, $h, $crop) { |
| 506 |
|
$au = self::analyze_url($url); |
| 507 |
|
$op = new TimberImageOperationResize($w, $h, $crop); |
|
@@ 505-515 (lines=11) @@
|
| 502 |
|
); |
| 503 |
|
return $new_path; |
| 504 |
|
} |
| 505 |
|
static function get_resize_file_url($url, $w, $h, $crop) { |
| 506 |
|
$au = self::analyze_url($url); |
| 507 |
|
$op = new TimberImageOperationResize($w, $h, $crop); |
| 508 |
|
$new_url = self::_get_file_url( |
| 509 |
|
$au['base'], |
| 510 |
|
$au['subdir'], |
| 511 |
|
$op->filename($au['filename'], $au['extension']), |
| 512 |
|
$au['absolute'] |
| 513 |
|
); |
| 514 |
|
return $new_url; |
| 515 |
|
} |
| 516 |
|
static function get_resize_file_path($url, $w, $h, $crop) { |
| 517 |
|
$au = self::analyze_url($url); |
| 518 |
|
$op = new TimberImageOperationResize($w, $h, $crop); |
|
@@ 516-525 (lines=10) @@
|
| 513 |
|
); |
| 514 |
|
return $new_url; |
| 515 |
|
} |
| 516 |
|
static function get_resize_file_path($url, $w, $h, $crop) { |
| 517 |
|
$au = self::analyze_url($url); |
| 518 |
|
$op = new TimberImageOperationResize($w, $h, $crop); |
| 519 |
|
$new_path = self::_get_file_path( |
| 520 |
|
$au['base'], |
| 521 |
|
$au['subdir'], |
| 522 |
|
$op->filename($au['filename'], $au['extension']) |
| 523 |
|
); |
| 524 |
|
return $new_path; |
| 525 |
|
} |
| 526 |
|
|
| 527 |
|
|
| 528 |
|
} |