Tariqa  3.0
 All Data Structures Namespaces Files Functions Variables Enumerations
searchEngine Class Reference
Inheritance diagram for searchEngine:
AggregatorsEngine AggregatorsIDOLEngine FactivaEngine GoogleEngine LatestNewsEngine LatestNewsIDOLEngine LexisNexisEngine OdinEngine OxfordAnalyticaEngine VirageEngine YahooNewsEngine

Public Member Functions

 __construct ($newsConfig)
 listArticles ($query)
 getArticle ($article_id)
 multiAjaxSearch ($query, $from, $count, $startDate=null, $endDate=null)
 getSavePost ($query_txt, $query, $start_date=null, $end_date=null, $additional_parameters=array())

Static Public Member Functions

static addNode ($name, $value, $doc, $cdata=false, $parameters=null)
static transformToXML ($result, $config)

Protected Member Functions

 link ($id, $extra_arguments=null)
 js_link ($id, $title)
 date2range ($date)

Static Protected Member Functions

static controls2string ($controls)

Protected Attributes

 $newsConfig
 $date_format

Detailed Description

Base class for fetching the news results from an engine

Author:
Cosmin Popescu

Constructor & Destructor Documentation


Member Function Documentation

static addNode ( name,
value,
doc,
cdata = false,
parameters = null 
) [static]

Adds a node to the result xml

Parameters:
string$nameThe node name
string$valueThe value of the node
$docDOMDocument The XML document
boolean$cdataIf true, then the node is added as a CDATA section [OPTIONAL]
string$parametersThe node parameters [OPTIONAL] public
Returns:
static controls2string ( controls) [static, protected]

Transforms the additional controls from array to string

Parameters:
array$controlsThe controls protected
Returns:
string
date2range ( date) [protected]

Converts a date from UNIX timestamps to range of days from the current day

Parameters:
int$dateThe date protected
Returns:
int
getArticle ( article_id) [abstract]

Gets a specific article

Parameters:
string$article_idThe article identifier public
Returns:
DOMDocument

Reimplemented in VirageEngine, LatestNewsIDOLEngine, AggregatorsIDOLEngine, AggregatorsEngine, GoogleEngine, LexisNexisEngine, LatestNewsEngine, OxfordAnalyticaEngine, YahooNewsEngine, FactivaEngine, and OdinEngine.

getSavePost ( query_txt,
query,
start_date = null,
end_date = null,
additional_parameters = array() 
) [abstract]

Gets the POST data used for saving a search in the briefcase

Parameters:
string$query_txtThe query string text
Query$queryThe query
int$start_dateThe start date (unix timestamp) [OPTIONAL]
int$end_dateThe end date (unix timestamp) [OPTIONAL]
array$additional_parametersAdditional parameters [OPTIONAL] public
Returns:
string

Reimplemented in VirageEngine, LatestNewsIDOLEngine, AggregatorsIDOLEngine, GoogleEngine, AggregatorsEngine, OxfordAnalyticaEngine, LatestNewsEngine, LexisNexisEngine, and YahooNewsEngine.

js_link ( id,
title 
) [protected]

Generates a javascript link for opening an article

Parameters:
string$idThe article identifier protected
Returns:
string
link ( id,
extra_arguments = null 
) [protected]

Generates a link for an article

Parameters:
string$idThe article identifier
string$extra_argumentsList of extra arguments GET encoded [OPTIONAL] protected
Returns:
string
listArticles ( query) [abstract]
multiAjaxSearch ( query,
from,
count,
startDate = null,
endDate = null 
) [abstract]

Gets the multi ajax search object

Parameters:
string$queryThe query string
int$fromThe first result to display
int$countThe number of results to display
DateTime$startDateThe start date [OPTIONAL]
DateTime$endDateThe end date [OPTIONAL] public
Returns:
multiAjaxSearch

Reimplemented in VirageEngine, LatestNewsIDOLEngine, AggregatorsIDOLEngine, AggregatorsEngine, GoogleEngine, OxfordAnalyticaEngine, LexisNexisEngine, LatestNewsEngine, YahooNewsEngine, FactivaEngine, and RSSEngine.

static transformToXML ( result,
config 
) [static]

Converts a tariqaSearchResultSet or a tariqaFullDocument to a DOM XML

Parameters:
tariqaSearchResultSet | tariqaFullDocument$resultThe result set
array$configThe news configuration array public
Returns:
DOMDocument

Field Documentation

$date_format [protected]
$newsConfig [protected]

The documentation for this class was generated from the following file: