PHP 클래스 Bkwld\Croppa\Handler

상속: extends Illuminate\Routing\Controller
파일 보기 프로젝트 열기: bkwld/croppa

공개 메소드들

메소드 설명
__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