PHP Класс Bkwld\Croppa\Handler

Наследование: extends Illuminate\Routing\Controller
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( URL $url, Bkwld\Croppa\Storage $storage, Illuminate\Http\Request $request, array $config = null ) Dependency injection
getContentType ( string $path ) : string Symfony kept returning the MIME-type of my testing jpgs as PNGs, so determining it explicitly via looking at the path name.
handle ( string $request ) : Symfony\Component\HttpFoundation\StreamedResponse Handles a Croppa style route
render ( string $request_path ) : string Render image directly

Описание методов

__construct() публичный Метод

Dependency injection
public __construct ( URL $url, Bkwld\Croppa\Storage $storage, Illuminate\Http\Request $request, array $config = null )
$url URL
$storage Bkwld\Croppa\Storage
$request Illuminate\Http\Request
$config array

getContentType() публичный Метод

Symfony kept returning the MIME-type of my testing jpgs as PNGs, so determining it explicitly via looking at the path name.
public getContentType ( string $path ) : string
$path string
Результат string

handle() публичный Метод

Handles a Croppa style route
public handle ( string $request ) : Symfony\Component\HttpFoundation\StreamedResponse
$request string The `Request::path()`
Результат Symfony\Component\HttpFoundation\StreamedResponse

render() публичный Метод

Render image directly
public render ( string $request_path ) : string
$request_path string The `Request::path()`
Результат string The path, relative to the storage disk, to the crop