classes/phing/tasks/ext/HttpRequestTask.php

A HTTP request task.

Making an HTTP request and try to match the response against an provided regular expression.

author
Benjamin Schultz
package
phing.tasks.ext
since
2.4.1
version
$Id: HttpRequestTask.php 764 2010-04-11 18:18:51Z bschultz $

\HttpRequestTask

A HTTP request task.

Making an HTTP request and try to match the response against an provided regular expression.

Extends from
\Task
author
Benjamin Schultz
copyright
2001,2002 THYRELL. All rights reserved
package
phing.tasks.ext
since
2.4.1
version
$Id: HttpRequestTask.php 764 2010-04-11 18:18:51Z bschultz $

Properties

Propertyprotectedstring  $_authPassword= ''

Holds the authentication password

Details
Type
string
Propertyprotectedstring  $_authScheme= ''

Holds the authentication scheme

Details
Type
string
Propertyprotectedstring  $_authUser= 'null'

Holds the authentication user name

Default valuenullDetails
Type
string
Propertyprotected\array<Parameter>  $_configData= 'array'

Holds additional config data for HTTP_Request2

Default valuearrayDetails
Type
\array<Parameter>
Propertyprotected\array<Parameter>  $_headers= 'array'

Holds additional header data

Default valuearrayDetails
Type
\array<Parameter>
Propertyprotected\array<string>  $_observerEvents= 'array'

Holds the events that will be logged

Default valuearrayDetails
Type
\array<string>
Propertyprotectedstring  $_responseRegex= ''

Holds the regular expression that should match the response

Details
Type
string
Propertyprotectedstring  $_url= 'null'

Holds the request URL

Default valuenullDetails
Type
string
Propertyprotectedboolean  $_verbose= 'false'

Whether to enable detailed logging

Default valuefalseDetails
Type
boolean

Methods

methodpublic  createConfig( ) : \Parameter
Creates a config parameter for this task
Returns
Type Description
\Parameter
methodpublic  createHeader( ) : \Parameter
Creates an additional header for this task
Returns
Type Description
\Parameter
methodpublic  init( ) :
Load the necessary environment for running this task.
Details
throws
methodpublic  main( ) :
Make the http request
methodpublic  setAuthPassword( string $password ) :
Sets the authentication password
Parameters
Name Type Description
$password string
methodpublic  setAuthScheme( string $scheme ) :
Sets the authentication scheme
Parameters
Name Type Description
$scheme string
methodpublic  setAuthUser( string $user ) :
Sets the authentication user name
Parameters
Name Type Description
$user string
methodpublic  setObserverEvents( string $observerEvents ) : void
Sets a list of observer events that will be logged if verbose output is enabled.
Parameters
Name Type Description
$observerEvents string List of observer events
methodpublic  setResponseRegex( string $regex ) :
Sets the response regex
Parameters
Name Type Description
$regex string
methodpublic  setUrl( string $url ) :
Sets the request URL
Parameters
Name Type Description
$url string
methodpublic  setVerbose( boolean $verbose ) :
Sets whether to enable detailed logging
Parameters
Name Type Description
$verbose boolean
Documentation was generated by DocBlox 0.13.1.