PHP 클래스 Screen\Capture

저자: André Filipe
파일 보기 프로젝트 열기: microweber/screen

공개 프로퍼티들

프로퍼티 타입 설명
$binPath string Bin directory, should contain the phantomjs file, otherwise it won't work
$jobs Screen\Location\Jobs Jobs directory, directory for temporary files to be written and executed with phantomjs
$output Screen\Location\Output Base directory to save the output files
$templatePath string Template directory, directory in which will be the js templates files to execute

보호된 프로퍼티들

프로퍼티 타입 설명
$backgroundColor string Default body background color is white
$clipHeight integer Height of the page to clip
$clipWidth integer Width of the page to clip
$height integer Height of the page to render
$imageLocation string Location where the file was written to
$imageType Screen\Image\Types\Type Image Type, default is jpeg
$includedJsScripts array List of included JS scripts
$includedJsSnippets array List of included JS snippets
$options array List of options which will be passed to phantomjs
$timeout integer Sets the timeout period
$url string URL to capture the screen of
$userAgentString string User Agent String used on the page request
$width integer Width of the page to render

공개 메소드들

메소드 설명
__construct ( $url = null ) Capture constructor.
getImageLocation ( ) : string Returns the location where the screenshot file was written
getImageType ( ) : Type Returns the image type instance
includeJs ( string | URL $script ) : Capture Adds a JS script or snippet to the screen shot script
save ( string $imageLocation, boolean $deleteFileIfExists = true ) : boolean Saves the screenshot to the requested location
setBackgroundColor ( string $backgroundColor ) : Capture Sets the page body background color
setBinPath ( $binPath ) Sets the path to PhantomJS binary, example: "/usr/bin"
setClipHeight ( integer $clipHeight ) : Capture Sets the height to clip
setClipWidth ( integer $clipWidth ) : Capture Sets the width to clip
setHeight ( integer $height ) : Capture Sets the page height
setImageType ( string $type ) : Capture Sets the image type
setOptions ( array $options ) Sets the options which will be passed to phantomjs
setTimeout ( integer $timeout ) : Capture Sets the timeout period
setUrl ( string $url ) Sets the url to screenshot
setUserAgentString ( string $userAgentString ) : Capture Sets the User Agent String to be used on the page request
setWidth ( integer $width ) : Capture Sets the page width

비공개 메소드들

메소드 설명
getOptionsString ( ) : string
getTemplateResult ( string $templateName, array $args ) : string

메소드 상세

__construct() 공개 메소드

Capture constructor.
public __construct ( $url = null )

getImageLocation() 공개 메소드

Returns the location where the screenshot file was written
public getImageLocation ( ) : string
리턴 string

getImageType() 공개 메소드

Returns the image type instance
public getImageType ( ) : Type
리턴 Screen\Image\Types\Type

includeJs() 공개 메소드

Adds a JS script or snippet to the screen shot script
public includeJs ( string | URL $script ) : Capture
$script string | URL Script to include
리턴 Capture

save() 공개 메소드

Saves the screenshot to the requested location
public save ( string $imageLocation, boolean $deleteFileIfExists = true ) : boolean
$imageLocation string Image Location
$deleteFileIfExists boolean True to delete the file if it exists
리턴 boolean

setBackgroundColor() 공개 메소드

Sets the page body background color
public setBackgroundColor ( string $backgroundColor ) : Capture
$backgroundColor string Background Color
리턴 Capture

setBinPath() 공개 메소드

Sets the path to PhantomJS binary, example: "/usr/bin"
public setBinPath ( $binPath )

setClipHeight() 공개 메소드

Sets the height to clip
public setClipHeight ( integer $clipHeight ) : Capture
$clipHeight integer Page clip height
리턴 Capture

setClipWidth() 공개 메소드

Sets the width to clip
public setClipWidth ( integer $clipWidth ) : Capture
$clipWidth integer Page clip width
리턴 Capture

setHeight() 공개 메소드

Sets the page height
public setHeight ( integer $height ) : Capture
$height integer Page Height
리턴 Capture

setImageType() 공개 메소드

Sets the image type
public setImageType ( string $type ) : Capture
$type string 'jpg', 'png', etc...
리턴 Capture

setOptions() 공개 메소드

Sets the options which will be passed to phantomjs
public setOptions ( array $options )
$options array

setTimeout() 공개 메소드

Sets the timeout period
public setTimeout ( integer $timeout ) : Capture
$timeout integer Timeout period
리턴 Capture

setUrl() 공개 메소드

Sets the url to screenshot
public setUrl ( string $url )
$url string URL

setUserAgentString() 공개 메소드

Sets the User Agent String to be used on the page request
public setUserAgentString ( string $userAgentString ) : Capture
$userAgentString string User Agent String
리턴 Capture

setWidth() 공개 메소드

Sets the page width
public setWidth ( integer $width ) : Capture
$width integer Page Width
리턴 Capture

프로퍼티 상세

$backgroundColor 보호되어 있는 프로퍼티

Default body background color is white
protected string $backgroundColor
리턴 string

$binPath 공개적으로 프로퍼티

Bin directory, should contain the phantomjs file, otherwise it won't work
public string $binPath
리턴 string

$clipHeight 보호되어 있는 프로퍼티

Height of the page to clip
protected int $clipHeight
리턴 integer

$clipWidth 보호되어 있는 프로퍼티

Width of the page to clip
protected int $clipWidth
리턴 integer

$height 보호되어 있는 프로퍼티

Height of the page to render
protected int $height
리턴 integer

$imageLocation 보호되어 있는 프로퍼티

Location where the file was written to
protected string $imageLocation
리턴 string

$imageType 보호되어 있는 프로퍼티

Image Type, default is jpeg
protected Type,Screen\Image\Types $imageType
리턴 Screen\Image\Types\Type

$includedJsScripts 보호되어 있는 프로퍼티

List of included JS scripts
protected array $includedJsScripts
리턴 array

$includedJsSnippets 보호되어 있는 프로퍼티

List of included JS snippets
protected array $includedJsSnippets
리턴 array

$jobs 공개적으로 프로퍼티

Jobs directory, directory for temporary files to be written and executed with phantomjs
public Jobs,Screen\Location $jobs
리턴 Screen\Location\Jobs

$options 보호되어 있는 프로퍼티

List of options which will be passed to phantomjs
protected array $options
리턴 array

$output 공개적으로 프로퍼티

Base directory to save the output files
public Output,Screen\Location $output
리턴 Screen\Location\Output

$templatePath 공개적으로 프로퍼티

Template directory, directory in which will be the js templates files to execute
public string $templatePath
리턴 string

$timeout 보호되어 있는 프로퍼티

Sets the timeout period
protected int $timeout
리턴 integer

$url 보호되어 있는 프로퍼티

URL to capture the screen of
protected string $url
리턴 string

$userAgentString 보호되어 있는 프로퍼티

User Agent String used on the page request
protected string $userAgentString
리턴 string

$width 보호되어 있는 프로퍼티

Width of the page to render
protected int $width
리턴 integer