phpBelBios
[ class tree: phpBelBios ] [ index: phpBelBios ] [ all elements ]

Class: Tixway

Source Location: /phpbelbios.inc

Class Overview


Tixway is the main class for PHP Belbios.


Methods


Child classes:

TixwayQuery
TixwayQuery is used to query information in the Tixway webservice.
TixwayTransaction
TixwayTransaction allows one to do a transaction, such as a reservation in the tixway database.

Class Details

[line 28]
Tixway is the main class for PHP Belbios.

It handles the XMLRPC calls as well as the pereparation of the various data. It also contains global helper methods for use in calls and data manipulation.




[ Top ]


Class Methods


constructor __construct [line 39]

Tixway __construct( $user $user, $password $password, [$parameters $parameters = array()])

Creates a new instance of Tixway. Provide a tixway username and passord. Additional default parameters (such as a default city_id) vcan be provided.



Overridden in child classes as:

TixwayQuery::__construct()

Parameters:

$user   $user   string a string containing the Tixway/Belbios B2B username
$password   $password   string a string containing the Tixway/Belbios B2B paassword
$parameters   $parameters  

array. Optioannl array with default parameters

Username and Password can be aquired by contacting Tixway at http://www.belbios.nl/b2bform.php


[ Top ]

method add_default_parameters [line 162]

void add_default_parameters( )

Sets the default parameteters.



Tags:

access:  public


[ Top ]

method build_url [line 60]

void build_url( )

Builds a query URL from the base url. Optionally adds ports and other HTTP url options.

Takes the parameters and turns them into a name=value string and adds that to tjhe URL.




Tags:

access:  public


[ Top ]

method call_url [line 74]

string call_url( $url $url)

Calls the URL and returns the data from the query



Tags:

return:  the result from the call, usually a string containing XML, but could potentially be anything from a 404 page to an HTML page.
access:  public


Parameters:

$url   $url   string A string with the entire URL that should be called for data.

[ Top ]

method do_call [line 48]

a do_call( )

Creates the complete URL, calls that, and parses the resulting XML.



Tags:

return:  SimpleXML object containing the requested data.
access:  public


[ Top ]

method get_default_parameters [line 152]

keyed get_default_parameters( )

Returns required, default parameters



Tags:

return:  array with all required and hardcoded parameters where key = parameter name and value = value.;
access:  public


[ Top ]

method get_normalized_http_url [line 172]

string get_normalized_http_url( )

Parses the http_url and rebuilds it into scheme://host/path with an option al port



Tags:

return:  a normalised url, optional with port added.
access:  public


[ Top ]

method get_parameter [line 132]

the get_parameter( $name $name)

Returns a single parameter



Tags:

return:  value of that parameter if set, else NULL;
access:  public


Parameters:

$name   $name   string the name of the parameter where we wnat the value for.

[ Top ]

method get_parameters [line 141]

keyed get_parameters( [$add_default $add_default = TRUE])

Returns all parameters



Tags:

return:  array with all parameters where key = parameter name and value = value.;
access:  public


Parameters:

$add_default   $add_default   set to FALSE to disable inclusion of so called default parameters (such as login-credentials)

[ Top ]

method parse_xml [line 91]

an parse_xml( $xml_string $xml_string)

Parses the XML using SimpleXML and puts theresulting records in an array for easier handling.



Tags:

return:  array containing the simpleXMLobjects of each found record.
access:  public


Parameters:

$xml_string   $xml_string   string containing the XML that must be parsed.

[ Top ]

method set_parameter [line 112]

no set_parameter( $name $name, $value $value)

Adds a parameter to the set of parameters



Tags:

return:  return value;
access:  public


Parameters:

$name   $name   string the name of the parameter to be added, does not have to be urlencoded (or RFC3986) yet.
$value   $value   string the value of the parameter to be added, does not have to be urlencoded (or RFC3986) yet.

[ Top ]

method set_parameters [line 121]

no set_parameters( [$params $params = array()])

Adds a range of parameters to the set of parameters



Tags:

return:  return value;
access:  public


Parameters:

$params   $params   array with key = name of the parameterand value is value of the parameter to be added, does not have to be urlencoded (or RFC3986) yet.

[ Top ]

method to_postdata [line 185]

string to_postdata( )

builds the data one would send in a POST request



Tags:

return:  a name=value string where all chunks are urlencoded according to RFC3986
access:  public


[ Top ]


Documentation generated on Tue, 13 May 2008 22:23:38 +0200 by phpDocumentor 1.4.1Support This Project