32 lines
685 B
PHP
32 lines
685 B
PHP
<?php
|
|
|
|
namespace Aweos\Resizer\Classes;
|
|
|
|
class FirstLetterStrategy {
|
|
|
|
public function sourcePath($fileName) {
|
|
return 'source';
|
|
}
|
|
|
|
public function sourceFileBasename($uploadedFile, $data) {
|
|
return str_slug($data['title']);
|
|
}
|
|
|
|
public function publicPath($filename) {
|
|
return strtolower($filename[0]);
|
|
}
|
|
|
|
public function smallFilename($filename, $width) {
|
|
return pathinfo($filename, PATHINFO_FILENAME).'-'.$width.'.'.pathinfo($filename, PATHINFO_EXTENSION);
|
|
}
|
|
|
|
public function croppedPath() {
|
|
return 'cropped';
|
|
}
|
|
|
|
public function croppedFilename($filename, $crop) {
|
|
return $filename;
|
|
}
|
|
|
|
}
|