PHP 클래스 IMDBHelper, PHP-IMDB-Grabber

상속: extends IMDB
파일 보기 프로젝트 열기: fabianbeiner/php-imdb-grabber 1 사용 예제들

공개 메소드들

메소드 설명
arrayOutput ( boolean $bArrayOutput, string $sSeparator, string $sNotFound, array $aReturn = null, boolean $bHaveMore = false ) : array Preferred output in responses with multiple elements
cleanString ( string $sInput ) : string
getShortText ( string $sText, integer $iLength = 100 ) : string
matchRegex ( string $sContent, string $sPattern, null $iIndex = null ) : array Regular expression helper.
runCurl ( string $sUrl, boolean $bDownload = false ) : boolean | mixed
saveImage ( string $sUrl, integer $iId ) : string

메소드 상세

arrayOutput() 공개 정적인 메소드

Preferred output in responses with multiple elements
public static arrayOutput ( boolean $bArrayOutput, string $sSeparator, string $sNotFound, array $aReturn = null, boolean $bHaveMore = false ) : array
$bArrayOutput boolean Native array or string with separators.
$sSeparator string String separator.
$sNotFound string Not found text.
$aReturn array Original input.
$bHaveMore boolean Have more elements indicator.
리턴 array Multiple results separated by selected separator string.

cleanString() 공개 정적인 메소드

public static cleanString ( string $sInput ) : string
$sInput string Input (eg. HTML).
리턴 string Cleaned string.

getShortText() 공개 정적인 메소드

public static getShortText ( string $sText, integer $iLength = 100 ) : string
$sText string The long text.
$iLength integer The maximum length of the text.
리턴 string The shortened text.

matchRegex() 공개 정적인 메소드

Regular expression helper.
public static matchRegex ( string $sContent, string $sPattern, null $iIndex = null ) : array
$sContent string The content to search in.
$sPattern string The regular expression.
$iIndex null The index to return.
리턴 array If no match was found.

runCurl() 공개 정적인 메소드

public static runCurl ( string $sUrl, boolean $bDownload = false ) : boolean | mixed
$sUrl string The URL to fetch.
$bDownload boolean Download?
리턴 boolean | mixed Array on success, false on failure.

saveImage() 공개 정적인 메소드

public static saveImage ( string $sUrl, integer $iId ) : string
$sUrl string The URL to the image to download.
$iId integer The ID of the movie.
리턴 string Local path.