PHP Class Imdb\Request

Afficher le fichier Open project: tboothman/imdbphp Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $url, Config $config ) No need to call this.
addHeaderLine ( $name, $value )
getLastResponseHeaders ( )
getRedirect ( ) : string | null Get the URL to redirect to if a 30* was returned
getResponseBody ( ) : string Get the Response body
getStatus ( ) : integer | null HTTP status code of the last response
getresponseheader ( string $header ) : string Get a header value from the response
sendRequest ( ) : boolean Send a request to the movie site
setURL ( string $url ) Set the URL we need to parse

Private Methods

Méthode Description
callback_CURLOPT_HEADERFUNCTION ( $ch, $str )

Method Details

__construct() public méthode

No need to call this.
public __construct ( string $url, Config $config )
$url string URL to open
$config Config The Config object to use

addHeaderLine() public méthode

public addHeaderLine ( $name, $value )

getLastResponseHeaders() public méthode

getRedirect() public méthode

Get the URL to redirect to if a 30* was returned
public getRedirect ( ) : string | null
Résultat string | null URL to redirect to if 300, otherwise null

getResponseBody() public méthode

Get the Response body
public getResponseBody ( ) : string
Résultat string page

getStatus() public méthode

HTTP status code of the last response
public getStatus ( ) : integer | null
Résultat integer | null null if last request failed

getresponseheader() public méthode

Get a header value from the response
public getresponseheader ( string $header ) : string
$header string header field name
Résultat string header value

sendRequest() public méthode

Send a request to the movie site
public sendRequest ( ) : boolean
Résultat boolean success

setURL() public méthode

Set the URL we need to parse
public setURL ( string $url )
$url string