Tariqa  3.0
 All Data Structures Namespaces Files Functions Variables Enumerations
statics Class Reference

Static Public Member Functions

static URL ($script, $parameters=null, $urlencode=false)
static tariqaClientLoggedIn ($soapConfig)
static tariqaClientLogIn ($user, $appConfig, $soapConfig)
static loadTariqaClient ($user, $appConfig=null, $soapConfig=null)
static open_db_connection ($config)
static load_user_prefs ($user, $db)
static get_country ($country_id, $get_maps=false, $get_wiki=false)
static get_wiki_data ($country_id)
static get_theme ($theme_id)
static listCountries ($continent_id=null, $eu_members_only=null, $official_only=null, $region_id=null, $country_ids=null)
static listThemes ($ids=null)
static listContinents ()
static listOfficialRegions ($continent=null)
static loadSourceEngine ($query)
static getQuery ($query_id)
static listQueries ($access, $source_id, $weblogs_data=false)
static getThemeTopic ($topic_id, $access)
static getFlavour ($flavour_id)
static getSource ($source_id)
static getAdvSearchSources ()
static ListQuickSearchSources ($access)
static getEngine ($engine_id)
static getAggregatedFeed ($feed_id)
static path ($path)
static listFlavours ()
static listThemeQueries ($theme_id, $access)
static listCountryQueries ($country, $access)
static post2array ($s)
static ListThemeUsers ($theme_id)
static ListThemeTopics ($theme_id, $access)
static ListTVCategories ()
static ListHotspots ()
static getQueryIcon ($query, $config)
static getAllAggregatedRSSFeed ()
static browseLexisNexisSources ($folder_id)
static getHomePageFlavours ($access)
static getHomePageQueries ($access, $flavour=null, $translationTable=null)
static getContinent ($id)
static _isIE ()
static listOxanCountries ()
static listOxanTopics ()
static findSubTree ($db, $parent_id, $folder_id)
static archiveRecords ()
static ListNewstickersFeeds ()
static ListClusters ()
static getRssLink ($user, $page, $flavour_id=null, $no_a=false)
static stripTags ($html)
static makeXhtml ($html, $body_only=true)
static LexisNexisGetSourceDetails ($sourceId)
static LexisNexisGetSource ($sourceId)
static LatestNewsListLanguages ()
static log ($user, $db)
static completePath ($path, $delimiter= '/')
static getTranslations ($name)
static baseURL ($url, $no_path=false)
static ListFullSearchSources ($access)

Static Public Attributes

static $tariqaClient = null
static $tariqaToken = null
static $tariqaClientExpire = null

Detailed Description

Class defining the common functions that will be used without instantiating a class

Author:
Cosmin Popescu, Pascal Havelange

Member Function Documentation

static _isIE ( ) [static]

Returns true if the browser is IE public

Returns:
boolean
static archiveRecords ( ) [static]

Gets the number of video archive files public

Returns:
int
static baseURL ( url,
no_path = false 
) [static]

Gets the base URL of an url. By default, also the path will be included (for example, http://www.google.com/search?q=test will return http://www.google.com/search/. If you only want http://www.google.com/ to be returned, then set no_path to true

Parameters:
string$urlThe URL public
Returns:
string
static browseLexisNexisSources ( folder_id) [static]

Loads the LexisNexis sources

Parameters:
string$folder_idThe folder identifier public
Returns:
LexisNexisBrowseSourcesResponse
static completePath ( path,
delimiter = '/' 
) [static]

Transforms a path by adding a '/' character at the end if it doesn't already has it

Parameters:
string$pathThe path
string$delimiterThe path delimiter [OPTIONAL] public
Returns:
string
static findSubTree ( db,
parent_id,
folder_id 
) [static]

Returns true if $folder_id is in the subtree of $parent_id

Parameters:
mMysql$dbThe database connection
$parent_idThe parent folder identifier
$folder_idThe folder identifier public
Returns:
boolean
static get_country ( country_id,
get_maps = false,
get_wiki = false 
) [static]

Gets a country

Parameters:
string$country_idThe country ISO2 code
boolean$get_mapsIf true, also get the ReliefWeb and GlobalAtlas maps [OPTIONAL]
boolean$get_wikiIf true, also get the Wikipedia country profile [OPTIONAL] public
Returns:
Country
static get_theme ( theme_id) [static]

Gets a theme

Parameters:
int$theme_idThe theme identifier public
Returns:
Theme
static get_wiki_data ( country_id) [static]

Gets the wikidata of a country

Parameters:
string$country_idThe country identifier public
Returns:
static getAdvSearchSources ( ) [static]

Lists the sources for the advanced search public

Returns:
AdvancedSearch[]
static getAggregatedFeed ( feed_id) [static]

Loads a RSS feed

Parameters:
int$feed_idThe feed identifier public
Returns:
RSS_feed
static getAllAggregatedRSSFeed ( ) [static]

Gets the list of all feeds from the server public static

Returns:
RSS_feed[]
static getContinent ( id) [static]

Gets a continent

Parameters:
int$idThe continent identifier public
Returns:
Continent
static getEngine ( engine_id) [static]

Loads a news engine

Parameters:
string$engine_idThe engine identifier public
Returns:
Engine
static getFlavour ( flavour_id) [static]

Loads a query flavour

Parameters:
int$flavour_idThe flavour identifier public
Returns:
Flavour
static getHomePageFlavours ( access) [static]

Gets the home page tabs

Parameters:
string$accessThe current user access level public
Returns:
Flavour[]
static getHomePageQueries ( access,
flavour = null,
translationTable = null 
) [static]

Gets the home page queries

Parameters:
string$accessThe current user access level
Flavour$flavourThe flavour of the queries [OPTIONAL]
array$translationTableThe translation table [OPTIONAL] public static
Returns:
Query[]
static getQuery ( query_id) [static]

Loads a news query

Parameters:
int$query_idThe query identifier public
Returns:
Query
static getQueryIcon ( query,
config 
) [static]

Gets the icon of a given query

Parameters:
Query$queryThe query
array$configThe configuration array public static
Returns:
string
static getRssLink ( user,
page,
flavour_id = null,
no_a = false 
) [static]

Retrieves the RSS link

Parameters:
tariqaUser$userThe tariqa user
string$pageThe page from which the RSS is created
int$flavour_idThe flavour identifier (for news page, not for the search page) [OPTIONAL]
boolean$no_aIf set to true, then no a href is generated. Only the img tag [OPTIONAL] public
Returns:
string
static getSource ( source_id) [static]

Loads a news source

Parameters:
int$source_idThe source identifier public
Returns:
Source
static getThemeTopic ( topic_id,
access 
) [static]

Retrieves a theme topic

Parameters:
int$topic_idThe topic identifier
string$accessThe current user access level public
Returns:
ThemeTopic
static getTranslations ( name) [static]

Gets the translation for a specific module

Parameters:
string$nameThe module name public
Returns:
array
static LatestNewsListLanguages ( ) [static]

Gets the available languages for LatestNews search public

Returns:
LatestNewsLanguage[]
static LexisNexisGetSource ( sourceId) [static]

Gets a LexisNexis source

Parameters:
string$sourceIdThe source identifier public
Returns:
string[]
static LexisNexisGetSourceDetails ( sourceId) [static]

Gets the details for a LexisNexis source

Parameters:
string$sourceIdThe source identifier public
Returns:
string[]
static ListClusters ( ) [static]

Fetches the list of clusters public

Returns:
Cluster[]
static listContinents ( ) [static]

Loads the list of continents public

Returns:
Continent[]
static listCountries ( continent_id = null,
eu_members_only = null,
official_only = null,
region_id = null,
country_ids = null 
) [static]

Loads the list of countries

Parameters:
int$continent_idRestricts the list to a given Continent [OPTIONAL]
boolean$eu_members_onlyIf true, restricts the list to EU countries, if False, restricts it to NON-EU members [OPTIONAL]
boolean$official_onlyIt true, restricts the list to official countries, if False, restricts it to non official countries [OPTIONAL]
int$region_idThe official region identifier [OPTIONAL]
string[]$country_ids A list of countries ids [OPTIONAL] public
Returns:
Country[]
static listCountryQueries ( country,
access 
) [static]

Gets the list of queries for a given country

Parameters:
string | Country$countryThe ISO2 code of the country or the Country object
string$accessThe current user access level public
Returns:
Query[]
static listFlavours ( ) [static]

Gets the list of flavours public

Returns:
Flavour[]
static ListFullSearchSources ( access) [static]

Gets a list of full search sources

Parameters:
string$accessThe current user access level public
Returns:
FullSearchSource[]
static ListHotspots ( ) [static]

Gets the list of hotspots public

Returns:
string[]
static ListNewstickersFeeds ( ) [static]

Gets the list of newstickers predefined feeds public

Returns:
RSS_feed[]
static listOfficialRegions ( continent = null) [static]

Loads the list of regions

Parameters:
Continent$continenthecontinent [OPTIONAL] public
Returns:
OfficialRegion[]
static listOxanCountries ( ) [static]

Gets the lists of OXAN countries public

Returns:
MultiPair
static listOxanTopics ( ) [static]

Gets the lists of OXAN topics public

Returns:
MultiPair
static listQueries ( access,
source_id,
weblogs_data = false 
) [static]

List the queries

Parameters:
string$accessThe access level of the current user
int$source_idThe source identifier of the queries to retrieve [OPTIONAL]
boolean$weblogs_dataIf true, then get also the weblogs data [OPTIONAL] public
Returns:
Query[]
static ListQuickSearchSources ( access) [static]

Lists the quick search sources

Parameters:
string$accessThe access level of the current user public
Returns:
QuickSearchSource[]
static listThemeQueries ( theme_id,
access 
) [static]

Gets the list of queries for a given theme

Parameters:
int$theme_idThe theme identifier
string$accessThe current user access level public
Returns:
Query[]
static listThemes ( ids = null) [static]

Lists the themes

Parameters:
int[]$ids A list of theme ids [OPTIONAL] public
Returns:
Theme[]
static ListThemeTopics ( theme_id,
access 
) [static]

Gets the list of theme topics for a given theme

Parameters:
int$theme_idThe theme identifier
string$accessThe access level of current user public
Returns:
ThemeTopic[]
static ListThemeUsers ( theme_id) [static]

List the users that can edit the text for a given theme

Parameters:
int$theme_idThe theme identifier public
Returns:
ThemeUsers
static ListTVCategories ( ) [static]

Gets the list of TV categories public

Returns:
TariqaTVChannelCategory[]
static load_user_prefs ( user,
db 
) [static]

Gets the user preferences from the database

Parameters:
tariqaUser$userThe user
mMysql$dbThe database connection to load the preferences from public
Returns:
void
static loadSourceEngine ( query) [static]

Loads the Source and the Engine into a Query object if they are not loaded

Parameters:
Query$queryThe query public
Returns:
void
static loadTariqaClient ( user,
appConfig = null,
soapConfig = null 
) [static]

Loads the tariqa client

Parameters:
tariqaUser$userThe ECAS user
array$appConfigThe main application configuration array
array$soapConfigThe SOAP configuration array public
Returns:
void
static log ( user,
db 
) [static]

Logs the user trace

Parameters:
tariqaUser$userThe current user
mMysql$dbThe database connection

public

Returns:
void
static makeXhtml ( html,
body_only = true 
) [static]

Ensure that the received html string is xhtml compliant

Parameters:
string$htmlHtml data
bool$body_onlyIf set to true (default) only the body of the xhtml document is returned
static open_db_connection ( config) [static]

Initializes the connection to the database

Parameters:
array$configThe database section of the config array public
Returns:
static path ( path) [static]

Adds a '/' at the end of a path if it is the case

Parameters:
string$pathThe path public
Returns:
string
static post2array ( s) [static]

Converts a POST string (like 'var1=value1&var2=value2') to a PHP array

Parameters:
string$sThe post string public
Returns:
array
static stripTags ( html) [static]

String the HTML tags using xslt

Parameters:
string$htmlThe html string protected
Returns:
string
static tariqaClientLoggedIn ( soapConfig) [static]

Is the tariqa client logged in?

Parameters:
array$soapConfigThe soap configuration array public
Returns:
boolean
static tariqaClientLogIn ( user,
appConfig,
soapConfig 
) [static]

Logs in the tariqa client

Parameters:
tariqaUser$userThe ECAS user
array$appConfigThe main application configuration array
array$soapConfigThe SOAP configuration array public
Returns:
void
static URL ( script,
parameters = null,
urlencode = false 
) [static]

Compose an URL from a script and a list of parameters

Parameters:
string$scriptThe script name
mixed$paramsThe list of parameters (as a string or as an associative array)[OPTIONAL]
bool$urlencodeSet to true to URL encode arguments. Note: it will be ignored unless $params is an associative array of arguments [OPTIONAL] public
Returns:
string

Field Documentation

TariqaClient $tariqaClient = null [static]

The SOAP client

public

$tariqaClientExpire = null [static]
$tariqaToken = null [static]

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