Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
SearchDoc Class Reference
+ Collaboration diagram for SearchDoc:

Public Member Functions

 __construct ($dbaccess, $fromid=0)
 
 onlyCount ()
 
 getOriginalQuery ()
 
 join ($jointure)
 
 count ()
 
 reset ()
 
 isExecuted ()
 
 getFilters ()
 
 search ()
 
 getDocumentList ()
 
 searchError ()
 
 getError ()
 
 setDebugMode ($debug=true)
 
 setRecursiveSearch ($b=true)
 
 getDebugInfo ()
 
 getSearchInfo ()
 
 setSlice ($slice)
 
 setOrder ($order)
 
 useCollection ($dirid)
 
 setStart ($start)
 
 nextDoc ()
 
 addFilter ($filter)
 
 noViewControl ()
 
 setObjectReturn ($returnobject=true)
 
 setValueReturn ()
 
 excludeConfidential ($exclude=true)
 

Static Public Member Functions

static sqlcond ($values, $column, $integer=false)
 

Data Fields

 $fromid
 
 $dirid = 0
 
 $recursiveSearch = false
 
 $folderRecursiveLevel = 2
 
 $slice = "ALL"
 
 $start = 0
 
 $filters = array()
 
 $only = false
 
 $distinct = false
 
 $orderby = "title"
 
 $trash = ""
 
 $latest = true
 
 $userid = 0
 

Protected Member Functions

 getNextDocument (Array $v)
 

Detailed Description

Definition at line 20 of file Class.SearchDoc.php.

Constructor & Destructor Documentation

__construct (   $dbaccess,
  $fromid = 0 
)

initialize with family

Parameters
string$dbaccessdatabase coordinate
string$fromidfamily identificator to filter

Definition at line 126 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

Member Function Documentation

addFilter (   $filter)

add a condition in filters

Parameters
string$filterthe filter string
string$argsarguments of the filter string (arguments are escaped to avoid sql injection)
Returns
void

Definition at line 478 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

count ( )

count results search must be call before

Returns
int

Definition at line 208 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

excludeConfidential (   $exclude = true)

add a filter to not return confidential document if current user cannot see it

Parameters
boolean$excludeset to true to exclude confidential
Returns
void

Definition at line 551 of file Class.SearchDoc.php.

getDebugInfo ( )

return debug info if debug mode enabled

Deprecated:
Returns
array of info

Definition at line 359 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

getDocumentList ( )

Definition at line 312 of file Class.SearchDoc.php.

getError ( )

Return error message

Returns
string

Definition at line 328 of file Class.SearchDoc.php.

getFilters ( )

Return sql filters used for request

Returns
array of string

Definition at line 240 of file Class.SearchDoc.php.

getNextDocument ( Array  $v)
protected

Return an object document from array of values

Parameters
array$vthe values of documents
Returns
Doc the document object

Definition at line 456 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

getOriginalQuery ( )

return original sql query before test permissions

Returns
string

Definition at line 191 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

getSearchInfo ( )

return information about query after search is call

Returns
array of info

Definition at line 369 of file Class.SearchDoc.php.

isExecuted ( )

Verify if query is already sended to database

Returns
boolean

Definition at line 232 of file Class.SearchDoc.php.

join (   $jointure)

Definition at line 197 of file Class.SearchDoc.php.

nextDoc ( )

can, be use in search must be call before

Returns
Doc or null if this is the end

Definition at line 431 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

noViewControl ( )

add a condition in filters

Returns
void

Definition at line 522 of file Class.SearchDoc.php.

onlyCount ( )

count results without return data

Returns
int the number of results

Definition at line 139 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

reset ( )

*reset results to use another search

Returns
void

Definition at line 223 of file Class.SearchDoc.php.

search ( )

send search

Returns
array of documents

Definition at line 256 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

searchError ( )

Definition at line 320 of file Class.SearchDoc.php.

setDebugMode (   $debug = true)

do the search in debug mode, you can after the search get infrrmation with getDebugIndo()

Parameters
boolean$debugset to true search in debug mode
Deprecated:
Returns
void

Definition at line 339 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

setObjectReturn (   $returnobject = true)

the return of search will be array of document's object

Returns
void

Definition at line 531 of file Class.SearchDoc.php.

setOrder (   $order)

use different order , default is title

Parameters
string$orderthe new order, empty means no order
Returns
Boolean

Definition at line 391 of file Class.SearchDoc.php.

setRecursiveSearch (   $b = true)

set recursive mode for folder searches

Returns
void

Definition at line 349 of file Class.SearchDoc.php.

setSlice (   $slice)

set maximum number of document to return

Parameters
int$slicethe limit ('ALL' means no limit)
Returns
Boolean

Definition at line 379 of file Class.SearchDoc.php.

setStart (   $start)

set offset where start the result window

Parameters
int$startthe offset (0 is the begin)
Returns
Boolean true if set

Definition at line 419 of file Class.SearchDoc.php.

setValueReturn ( )

the return of search will be array of values

Deprecated:
Returns
void

Definition at line 541 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

static sqlcond (   $values,
  $column,
  $integer = false 
)
static

Definition at line 499 of file Class.SearchDoc.php.

+ Here is the call graph for this function:

useCollection (   $dirid)

use folder or search document to apply restrict the search

Parameters
int$dirididentificator of the collection
Returns
Boolean true if set

Definition at line 402 of file Class.SearchDoc.php.

Field Documentation

$dirid = 0

folder identificator filter int

Definition at line 31 of file Class.SearchDoc.php.

$distinct = false

bool

Definition at line 66 of file Class.SearchDoc.php.

$filters = array()

sql filters array

Definition at line 56 of file Class.SearchDoc.php.

$folderRecursiveLevel = 2

max recursive level int

Definition at line 41 of file Class.SearchDoc.php.

$fromid

family identificator filter string

Definition at line 26 of file Class.SearchDoc.php.

$latest = true

restriction to latest revision bool

Definition at line 81 of file Class.SearchDoc.php.

$only = false

search in sub-families set false if restriction to top family bool

Definition at line 61 of file Class.SearchDoc.php.

$orderby = "title"

order of result : like sql order string

Definition at line 71 of file Class.SearchDoc.php.

$recursiveSearch = false

recursive search for folders boolean

Definition at line 36 of file Class.SearchDoc.php.

$slice = "ALL"

number of results : set "ALL" if no limit int

Definition at line 46 of file Class.SearchDoc.php.

$start = 0

index of results begins int

Definition at line 51 of file Class.SearchDoc.php.

$trash = ""

to search in trash : [no|also|only] string

Definition at line 76 of file Class.SearchDoc.php.

$userid = 0

user identificator : set to current user by default int

Definition at line 86 of file Class.SearchDoc.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen - published under CC License - Dynacase