PHP 클래스 Bkwld\Croppa\Helpers

파일 보기 프로젝트 열기: bkwld/croppa 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( URL $url, Bkwld\Croppa\Storage $storage, Handler $handler ) Dependency injection
delete ( string $url ) : void Delete source image and all of it's crops
render ( string $url ) : string Render image
reset ( string $url ) : void Delete just the crops, leave the source image
tag ( string $url, integer $width = null, integer $height = null, array $options = null ) : string Create an image tag rather than just the URL. Accepts the same params as url()
url ( string $url, integer $width = null, integer $height = null, array $options = null ) : string Pass through URL requests to URL->generate().

메소드 상세

__construct() 공개 메소드

Dependency injection
public __construct ( URL $url, Bkwld\Croppa\Storage $storage, Handler $handler )
$url URL
$storage Bkwld\Croppa\Storage
$handler Handler

delete() 공개 메소드

Delete source image and all of it's crops
또한 보기: Bkwld\Croppa\Storage::deleteSrc()
또한 보기: Bkwld\Croppa\Storage::deleteCrops()
public delete ( string $url ) : void
$url string URL of src image
리턴 void

render() 공개 메소드

Render image
또한 보기: Bkwld\Croppa\URL::generate()
public render ( string $url ) : string
$url string URL of an image that should be rendered
리턴 string The new path to your thumbnail

reset() 공개 메소드

Delete just the crops, leave the source image
또한 보기: Bkwld\Croppa\Storage::deleteCrops()
public reset ( string $url ) : void
$url string URL of src image
리턴 void

tag() 공개 메소드

Create an image tag rather than just the URL. Accepts the same params as url()
또한 보기: Bkwld\Croppa\URL::generate()
public tag ( string $url, integer $width = null, integer $height = null, array $options = null ) : string
$url string URL of an image that should be cropped
$width integer Target width
$height integer Target height
$options array Additional Croppa options, passed as key/value pairs. Like array('resize')
리턴 string An HTML img tag for the new image

url() 공개 메소드

Pass through URL requests to URL->generate().
또한 보기: Bkwld\Croppa\URL::generate()
public url ( string $url, integer $width = null, integer $height = null, array $options = null ) : string
$url string URL of an image that should be cropped
$width integer Target width
$height integer Target height
$options array Additional Croppa options, passed as key/value pairs. Like array('resize')
리턴 string The new path to your thumbnail