Overview

Classes

  • orsxml_api
  • orsxml_charter_api
  • orsxml_core
  • orsxml_hotel_api
  • orsxml_oneway_api
  • orsxml_pauschal_api
  • orsxml_soap
  • orsxml_trips_api

Interfaces

  • orsxml_api_interface
  • Overview
  • Class
  • Tree

Class orsxml_core

Direct known subclasses

orsxml_api

Indirect known subclasses

orsxml_charter_api, orsxml_hotel_api, orsxml_oneway_api, orsxml_pauschal_api, orsxml_trips_api
Author: Gregor Flajs, gregor.flajs@ors.si
Located at orsxml.core.class.php
Methods summary
public
# __construct( )
public
# makeXmlRequest( array $searchData, array $headerData, string $act, string $typ = '', array $topOffersFilter = array() )

Creates XML request with $searchData, $act action and $typ type of content. It returns parsed XML response in array format.

Creates XML request with $searchData, $act action and $typ type of content. It returns parsed XML response in array format.

Parameters

$searchData
array
$searchData , search data in array
$headerData
array
$headerData , header data in array
$act
string
$act , action to execute
$typ
string
$typ , content type
$topOffersFilter
array
$topOffersFilter , some actions like REQ_ACT_SRCHOFFER and REQ_ACT_SRCHREGION can have topOffersFilter set.
public
# postToHost( mixed $xmlReq, mixed $act )
public
# createORSXMLReq( mixed $searchData, mixed $headerData, mixed $act, mixed $typ, mixed $topOffersFilter = array() )
public
# createORSXmlReqRoot( mixed $headerData, mixed $act, mixed $typ = '' )
public
# createORSXMLReqValues( mixed $searchData, mixed $domXml )
public
# createORSXMLReqTopOffer( mixed $topOffersFilter = array(), mixed $domXml )
public
# createORSXMLReqTopRegion( mixed $topOffersFilter = array(), mixed $domXml )
public
# createORSXMLReqFilter( mixed $searchData, mixed $act, mixed $domXml )
public
# createORSXMLReqFilterOLD( mixed $searchData, mixed $act, mixed $domXml )
public
# createORSXMLReqSort( mixed $searchData, mixed $act, mixed $domXml )
public
# createORSXMLReqSortOLD( mixed $searchData, mixed $act, mixed $domXml )
public
# createORSXMLReqOffsetPonudbe( mixed $searchData, mixed $act, mixed $domXml )
public
# createORSXMLReqOffsetPonudbeOLD( mixed $searchData, mixed $act, mixed $domXml )
public
# createORSXMLReqOffsetTermini( mixed $searchData, mixed $act, mixed $domXml )
public
# createORSXMLReqOffsetTerminiOLD( mixed $searchData, mixed $act, mixed $domXml )
public
# convertXmlToArray( string $xml )

Convert XML string to array

Convert XML string to array

Parameters

$xml
string
$xml
public
# parseXML( mixed $dom, mixed & $arrXML )
public
# curlPost( string $link, string $postData, integer $timeOut = -1 )

Post data via Curl to ORSXML service.

Post data via Curl to ORSXML service.

Parameters

$link
string
$link
$postData
string
$postData , xml reqeust
$timeOut
integer
$timeOut , curl reqeust timeout in seconds
public
# cleanUrl( string $str )

Return clean URL with dashes from string.

Return clean URL with dashes from string.

Parameters

$str
string
$str
public
# paramsStringToArray( mixed $paramsString, mixed $delimeter = ",", mixed $assigner = '=' )
public
# midFreeArray( )
public
# midNotFreeArray( )
public
# midOnRequestArray( )
public
# midOfflineArray( )
public
# midSoldArray( )
public
# midCheckMsgArray( )
public
# getQueryUrl( mixed $searchData, mixed $unsets = array(), mixed $extParams = array() )
public
# getSelectedUrl( mixed $selArr = array(), mixed $onlyAvailableTags = array() )
public
# getRegionURL( array $searchData, array $region, boolean $cleanUrl = true )

Returns region URL from region data.

Returns region URL from region data.

Parameters

$searchData
array
$searchData
$region
array
$region , region data
$cleanUrl
boolean
$cleanUrl , if TRUE then clean URL is created.
public
# getOfferURL( array $searchData, array $offer, boolean $cleanUrl = true )

Returns ofer URL from offer data.

Returns ofer URL from offer data.

Parameters

$searchData
array
$searchData
$offer
array
$offer , offer data
$cleanUrl
boolean
$cleanUrl , if TRUE then clean URL is created.
public
# getTripURL( array $searchData, array $offer, array $trip, boolean $cleanUrl = true )

Returns ofer URL from offer data.

Returns ofer URL from offer data.

Parameters

$searchData
array
$searchData
$offer
array
$offer , offer data
$trip
array
$trip , trip data
$cleanUrl
boolean
$cleanUrl , if TRUE then clean URL is created.
public array
# regions( mixed $searchData, mixed $headerData, mixed $topOffersFilter = array(), boolean $cleanUrl = true )

Get a list of regions.

Get a list of regions.

Parameters

$searchData
mixed
$searchData
$headerData
mixed
$headerData
$topOffersFilter
mixed
$topOffersFilter , top offers filter. Set array for each content type (i.e.: array('hotel' => array('rgcs' => '123,160,133'), 'pauchal' => array('rgcs' => '133') ) )
$cleanUrl
boolean
$cleanUrl , TRUE returns clean URL

Returns

array
array('top_regions' => array(..), 'regions' => array(..))
public array
# offers( mixed $searchData, mixed $headerData, mixed $topOffersFilter = array(), boolean $cleanUrl = true )

Get a list of offers.

Get a list of offers.

Parameters

$searchData
mixed
$searchData
$headerData
mixed
$headerData
$topOffersFilter
mixed
$topOffersFilter , top offers filter (toc, stc, gid, hon, ...)
$cleanUrl
boolean
$cleanUrl , TRUE returns clean URL

Returns

array
array('top_offers' => array(..), 'offers' => array(..), 'filters' => array(..), 'sorts' => array(..))
public array
# offersFilter( array $searchData, array $filter, array $headerData, array $topOffersFilter = array(), boolean $cleanUrl )

Returns filtered offers.

Returns filtered offers.

Parameters

$searchData
array
$searchData
$filter
array
$filter , array of filters to include in request. Ie: array('vpc' => 'HP', 'zac' => 'DZ', ...)
$headerData
array
$headerData
$topOffersFilter
array
$topOffersFilter
$cleanUrl
boolean
$cleanUrl

Returns

array
same as offers()
public array
# offersSort( array $searchData, string $sort, array $headerData, array $topOffersFilter = array(), boolean $cleanUrl )

Returns sorted offers.

Returns sorted offers.

Parameters

$searchData
array
$searchData
$sort
string
$sort , a filed name on which to sort results and direction sepparated by '|' sign . Ie: 'ppc|desc' or 'htn|asc'
$headerData
array
$headerData
$topOffersFilter
array
$topOffersFilter
$cleanUrl
boolean
$cleanUrl

Returns

array
same as offers()
public array
# offersPage( array $searchData, integer $offset, array $headerData, array $topOffersFilter = array(), boolean $cleanUrl )

Change page for offers.

Change page for offers.

Parameters

$searchData
array
$searchData
$offset
integer
$offset , a page number ($offset = 0 , means page 1). You get total number of pages from @return['header]['pages']
$headerData
array
$headerData
$topOffersFilter
array
$topOffersFilter
$cleanUrl
boolean
$cleanUrl

Returns

array
same as offers()
public array
# trips( mixed $searchData, mixed $headerData, mixed $cleanUrl = true )

Get a list of trips.

Get a list of trips.

Parameters

$searchData
mixed
$searchData
$headerData
mixed
$headerData
$cleanUrl
mixed
$topOffersFilter , top trips filter (toc, vpc, zac, ...)

Returns

array
array('header' => array(),, 'offer' => array(..), 'trips' => array(..), 'filters' => array(..), 'sorts' => array(..))
public array
# tripsFilter( array $searchData, array $filter, array $headerData, boolean $cleanUrl )

Returns filtered trips.

Returns filtered trips.

Parameters

$searchData
array
$searchData
$filter
array
$filter , array of filters to include in request. Ie: array('vnd' => '20130101', 'tdc' => 5, ...)
$headerData
array
$headerData
$cleanUrl
boolean
$cleanUrl

Returns

array
same as trips()
public array
# tripsSort( array $searchData, string $sort, array $headerData, boolean $cleanUrl )

Returns sorted trips.

Returns sorted trips.

Parameters

$searchData
array
$searchData
$sort
string
$sort , a filed name on which to sort results and direction sepparated by '|' sign . Ie: 'ppc|desc' or 'vnd|asc'
$headerData
array
$headerData
$cleanUrl
boolean
$cleanUrl

Returns

array
same as trips()
public array
# tripsPage( array $searchData, integer $offset, array $headerData, boolean $cleanUrl )

Change page for trips.

Change page for trips.

Parameters

$searchData
array
$searchData
$offset
integer
$offset , a page number ($offset = 0 , means page 1). You get total number of pages from @return['header]['pages']
$headerData
array
$headerData
$cleanUrl
boolean
$cleanUrl

Returns

array
same as trips()
public array
# offerTripInfo( array $searchData, array $headerData )

Returns offer and trip info from hsc.

Returns offer and trip info from hsc.

Parameters

$searchData
array
$searchData , set trip hsc to get full info for this offer and trip
$headerData
array
$headerData

Returns

array
array('header' => array(..), 'offer' => array(..), 'trip' => array(..))
public array
# check( array $searchData, array $trip, array $headerData )

Availability check.

Availability check.

Parameters

$searchData
array
$searchData
$trip
array
$trip , needed params are (hsc and toc, also sid for bus trips).
$headerData
array
$headerData

Returns

array
array('offerTripInfo' => array(..), 'response' => array(..), 'offer' => array(..), 'operator' => array(..), 'travellers' => array(..), 'info' => array(..))
public array
# register( array $searchData, array $trip, array $headerData, boolean $booking = true )

Register offer in ORS.

Register offer in ORS.

Parameters

$searchData
array
$searchData
$trip
array
$trip , needed params are (hsc and toc, also sid for bus trips).
$headerData
array
$headerData
$booking
boolean
$booking , false - test registration (booking doesn't go in ORS), true - live registration (booking goes in ORS)

Returns

array
array('offerTripInfo' => array(..), 'response' => array(..), 'offer' => array(..), 'operator' => array(..), 'travellers' => array(..), 'info' => array(..))
public array
# flightInfo( array $searchData, array $headerData )

Get flight data.

Get flight data.

Parameters

$searchData
array
$searchData, needed parameters are: hsc and toc
$headerData
array
$headerData

Returns

array
array('response' => array(..), 'times' => array(..), 'info' => array(..))
Properties summary
protected mixed $typ
#
protected mixed $xmlReq
#
protected mixed $xmlRes
#
API documentation generated by ApiGen 2.8.0