Property | Type | Description | |
---|---|---|---|
$backgroundColor | string | ||
$binPath | string | ||
$height | integer | ||
$quality | integer | ||
$timeout | integer | ||
$url | integer |
Method | Description | |
---|---|---|
__construct ( $binPath = '', $width = 640, $height = 480, $quality = 60, $timeout = 5000, $backgroundColor = null ) | ||
save ( string $targetFile ) : boolean | Convert the webpage to an image. | |
setBackgroundColor ( string $backgroundColor ) | Set the background color. | |
setBinPath ( string $binPath ) | ||
setHeight ( integer $height ) | ||
setHeightToRenderWholePage ( ) | Set to height so the whole page will be rendered. | |
setQuality ( $quality ) | Set the image quality. | |
setTimeout ( integer $timeout ) | ||
setUrl ( string $url ) | ||
setWidth ( integer $width ) |
Method | Description | |
---|---|---|
getPhantomJsScript ( string $targetFile ) : string | Get the script to be executed by phantomjs. | |
takeScreenShot ( $targetFile ) | Take the screenshot. |
public __construct ( $binPath = '', $width = 640, $height = 480, $quality = 60, $timeout = 5000, $backgroundColor = null ) |
protected getPhantomJsScript ( string $targetFile ) : string | ||
$targetFile | string | |
return | string |
public setBackgroundColor ( string $backgroundColor ) | ||
$backgroundColor | string |
public setHeightToRenderWholePage ( ) |
protected takeScreenShot ( $targetFile ) | ||
$targetFile |