Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
SearchAccount Class Reference
+ Collaboration diagram for SearchAccount:

Public Member Functions

 __construct ()
 
 addRoleFilter ($role)
 
 addGroupFilter ($group)
 
 setTypeFilter ($type)
 
 addFilter ($filter, $arg=null)
 
 setOrder ($order)
 
 setSlice ($slice)
 
 setStart ($start)
 
 useViewControl ($control=true)
 
 overrideViewControl ($override=true)
 
 setObjectReturn ($type)
 
 setReturnType ($type)
 
 filterFamily ($family)
 
 search ()
 
 getQuery ()
 

Static Public Member Functions

static docName2login ($name)
 
static getLoginFromDocName ($name)
 

Data Fields

const userType = 0x01
 
const groupType = 0x02
 
const roleType = 0x04
 
const returnAccount = 1
 
const returnDocument = 2
 

Detailed Description

$s = new SearchAccount();
$s->addRoleFilter($s->getLoginFromDocName('TST_ROLEWRITTER'));
$s->addGroupFilter("all");
$s->addFilter("mail ~ '%s'", "test");
$al = $s->search();
foreach ($al as $account) {
printf("%s => %s\n ", $account->login, $account->mail);
}

Definition at line 27 of file Class.SearchAccount.php.

Constructor & Destructor Documentation

__construct ( )

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

+ Here is the call graph for this function:

Member Function Documentation

addFilter (   $filter,
  $arg = null 
)

add sql filter about Account properties

Api:
add sql filter about Account properties
$s->addFilter("mail ~ '%s'", $mailExpr);
Parameters
string$filtersql filter
string$argoptional arguments

Definition at line 136 of file Class.SearchAccount.php.

addGroupFilter (   $group)

add group filter appartenance

Api:
add group filter appartenance
Parameters
string$groupgroup name (login)
Exceptions
Dcp\Sacc\Exception

Definition at line 97 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

addRoleFilter (   $role)

add role filter appartenance

Api:
add role filter appartenance
Parameters
string$rolerole reference (login)
Exceptions
Dcp\Sacc\Exception

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

+ Here is the call graph for this function:

static docName2login (   $name)
static

convert logical name document to login account

Deprecated:
use SearchAccount::getLoginFromDocName instead
See Also
SearchAccount::getLoginFromDocName
Parameters
string$namelolgical name
Returns
string login , null if not found

Definition at line 254 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

filterFamily (   $family)
Parameters
string$family
Exceptions
Dcp\Sacc\Exceptionif $family is not a valid family name

Definition at line 279 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

static getLoginFromDocName (   $name)
static

get login account from logical name document

Api:
get login account from logical name document
Parameters
string$namelogical name
Returns
string|bool login , false if not found

Definition at line 268 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

getQuery ( )

get final query to search accounts

Returns
string

Definition at line 329 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

overrideViewControl (   $override = true)

include accounts the user cannot view

Api:
include accounts the user cannot view
Parameters
bool$override

Definition at line 207 of file Class.SearchAccount.php.

search ( )

send search of account's object

Api:
send search of account's object
Returns
DocumentList|AccountList

Definition at line 294 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

setObjectReturn (   $type)

set object type return by search method

Deprecated:
use SearchAccount::setReturnType instead
See Also
SearchAccount::setReturnType
Parameters
string$typeself::returnDocument or self::returnAccount
Exceptions
Dcp\Sacc\Exception

Definition at line 221 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

setOrder (   $order)

set order can be login, mail, id, firstname,… each Account properties

Api:
set order can be login, mail, id, firstname,… each Account properties
Parameters
string$order

Definition at line 156 of file Class.SearchAccount.php.

setReturnType (   $type)

set object type return by search method

Api:
set object type return by search method
Parameters
string$typeself::returnDocument or self::returnAccount
Exceptions
Dcp\Sacc\Exception

Definition at line 236 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

setSlice (   $slice)

set slice limit / "all" for no limit

Api:
set slice limit / "all" for no limit
Parameters
int | string$slice
Exceptions
Dcp\Sacc\Exception

Definition at line 166 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

setStart (   $start)

set start offset

Api:
set start offset
Parameters
int$start
Exceptions
Dcp\Sacc\Exception

Definition at line 180 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

setTypeFilter (   $type)

set account type filter (only matching accounts will be returned)

Api:
set account type filter (only matching accounts will be returned)
$s->setTypeFilter($s::userType | $s::groupType);
Parameters
int$typecan be bitmask of SearchAccount::userType, SearchAccount::groupType,SearchAccount::roleType

Definition at line 120 of file Class.SearchAccount.php.

useViewControl (   $control = true)

set if use view control document's privilege to filter account

Deprecated:
use SearchAccount::overrideViewControl instead. Be carefull: this is the opposite!
See Also
SearchAccount::overrideViewControl
Parameters
bool$control

Definition at line 196 of file Class.SearchAccount.php.

+ Here is the call graph for this function:

Field Documentation

const groupType = 0x02

group type filter

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

const returnAccount = 1

AccountList type return

Definition at line 44 of file Class.SearchAccount.php.

const returnDocument = 2

DocumentList type return

Definition at line 48 of file Class.SearchAccount.php.

const roleType = 0x04

role type filter

Definition at line 40 of file Class.SearchAccount.php.

const userType = 0x01

user type filter

Definition at line 32 of file Class.SearchAccount.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen