content
Packages
Interfaces
Classes
Files

Class: Search

Source Location: /content/search.class.php [line 39]

Class Overview


Author(s):



Class Details

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor Search [line 53]

Search Search( [string $search = ''], [mixed[] $modules = array()])
Builds a search object. Query Complexity: 6 + k / 10 database queries. (k represent the number of module without search cache)

Parameters:

string   $search   the string to search
mixed[]   $modules   Modules in which we gonna search with their search params. This argument is an array which keys are module id's and values are arrays containing the specialized search arguments for a particular module.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_ids [line 410]

int get_ids( )
Returns the search id

Tags:

  • return: the search id
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_results [line 228]

int get_results( string[] &$results, string[] &$module_ids, [int $nb_lines = 0], [int $offset = 0])
Puts results from the search results in the $results parameter and returns the number of results. Query complexity: 1 query.

Tags:

  • return: The number of results

Parameters:

string[]   &$results   the results returned
string[]   &$module_ids   the modules ids from which retrieve results
int   $nb_lines   the number of lines to return
int   $offset   the offset from which return results
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_results_by_id [line 190]

int get_results_by_id( string[] &$results, [int $id_search = 0], [int $nb_lines = 0], [int $offset = 0])
Puts results from the search results identified by the $id_search parameter in the $results parameter and returns the number of results. Query complexity: 2 queries.

Tags:

  • return: The number of results

Parameters:

string[]   &$results   the results returned
int   $id_search   the search id
int   $nb_lines   the number of lines to return
int   $offset   the offset from which return results
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method insert_results [line 286]

void insert_results( mixed[] &$requestAndResults)
Inserts search results in the database cache in order to speed up next searches. Query complexity: 1 + k / 10 queries. (k represent the number of results to insert in the database)

Parameters:

mixed[]   &$requestAndResults   This parameters is an array with keys that are modules ids and values that could be both a SQL query or a results array.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method is_in_cache [line 391]

bool is_in_cache( string $module_id)
Returns true if the module results are in cache, else, false.

Tags:

  • return: true if the module results are in cache, else, false.

Parameters:

string   $module_id   the module to check.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method is_search_id_in_cache [line 364]

bool is_search_id_in_cache( int $id_search)
Returns true if the id_search is in cache, else, false.

Tags:

  • return: true if the id_search is in cache, else, false.

Parameters:

int   $id_search   the search id to check.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method modules_in_cache [line 401]

string[] modules_in_cache( )
Returns the list of the modules ids present in the cache

Tags:

  • return: the list of the modules present in the cache
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 459]   mixed  $errors 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 454]   mixed  $id_search 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 458]   mixed  $id_user 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 456]   mixed  $modules 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 457]   mixed  $modules_conditions 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 455]   mixed  $search 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
Documentation generated on Tue, 28 Jul 2009 22:43:41 +0200 by phpDocumentor 1.4.1