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

Public Member Functions

 __construct ($dbaccess= '', $id= '', $res= '', $dbid=0)
 
 isControlled ()
 
 unsetControl ()
 
 removeControl ($userid=-1)
 
 setControl ($userctrl=true)
 
 setProfil ($profid, $fromdocidvalues=null)
 
 computeDProfil ($dprofid=0, $fromdocidvalues=null)
 
 setViewProfil ()
 
 isRealProfile ()
 
 modifyControl ($uid, $aclname, $deletecontrol=false)
 
 addControl ($uid, $aclname)
 
 isExtendedAcl ($aclname)
 
 delControl ($uid, $aclname)
 
 setCvid ($cvid)
 
 controlId ($docid, $aclname, $strict=false)
 
 controlExtId ($docid, $aclname, $strict=false)
 
 controlUserId ($docid, $uid, $aclname)
 
 controlUp ($uperm, $aclname)
 
 getUsersForAcl ($aclname)
 
 recomputeProfiledDocument ()
 
 isDocLinked ($title, $docid)
 
 isValidLink ($title, $docid)
 
 canEditMenu ()
 
 controlAclAccess ($acl)
 
 controlActifProfil ()
 
 profilIsActivate ($yes=true)
 
- Public Member Functions inherited from DocLDAP
 OrgInit ()
 
 UseLdap ()
 
 SetLdapParam ()
 
 getDNs ()
 
 setDNs ($ds, $tdn)
 
 canUpdateLdapCard ()
 
 RefreshLdapCard ()
 
 DeleteLdapCard ()
 
 getLDAPDN ($rdn, $path="")
 
 getMapAttributes ()
 
 ConvertToLdap ()
 
 getLDAPValue ($idattr, $index="")
 
 ModifyLdapCard ($tinfoldap)
 
 createLDAPDc ($ds, $n)
 
- Public Member Functions inherited from DbObj
 __construct ($dbaccess= '', $id= '', $res= '', $dbid=0)
 
 Select ($id)
 
 getValues ()
 
 affectColumn ($fields, $reset=true)
 
 affect ($array, $more=false, $reset=true)
 
 isAffected ()
 
 Complete ()
 
 preInsert ()
 
 postInsert ()
 
 preUpdate ()
 
 postUpdate ()
 
 preDelete ()
 
 postDelete ()
 
 preSelect ($id)
 
 postSelect ($id)
 
 Add ($nopost=false, $nopre=false)
 
 modify ($nopost=false, $sfields="", $nopre=false)
 
 delete ($nopost=false)
 
 Adds (&$tcopy, $nopost=false)
 
 lw ($prop)
 
 CloseConnect ()
 
 Create ($nopost=false)
 
 postInit ()
 
 init_dbid ()
 
 exec_query ($sql, $lvl=0, $prepare=false)
 
 numrows ()
 
 fetch_array ($c, $type=PGSQL_ASSOC)
 
 update ()
 
 setError ($moreerr= '')
 
 autoUpdate ()
 
 savePoint ($point)
 
 lockPoint ($exclusiveLock, $exclusiveLockPrefix= '')
 
 setMasterLock ($useLock)
 
 rollbackPoint ($point)
 
 commitPoint ($point)
 

Static Public Member Functions

static parseMail ($Email)
 
static isFutureDate ($date)
 
static isFloat ($x, $min=null, $max=null)
 
static isInteger ($x, $min=null, $max=null)
 
static isString ($x, $p)
 
static canExecute ($appname, $actname)
 

Data Fields

 $title = ''
 
 $dacls
 
 $extendedAcls = array()
 
 $profid
 
 $dprofid
 
 $views
 
 $attributes = null
 
 $doctype
 
 $id
 
 $initid
 
 $uperm
 
 $cvid
 
 $userid
 
- Data Fields inherited from DocLDAP
 $serveur
 
 $port
 
 $racine
 
 $rootdn
 
 $rootpw
 
 $useldap = false
 
 $infoldap = array()
 
 $cindex = false
 
 $ldapmap
 
 $ldapdn
 
- Data Fields inherited from DbObj
 $dbid = - 1
 
 $dbaccess = ''
 
 $fields
 
 $dbtable = ''
 
 $id_fields
 
 $criterias = array()
 
 $sup_fields = array()
 
 $sup_where = array()
 
 $sup_tables = array()
 
 $fulltextfields = array()
 
 $order_by = ""
 
 $isset = false
 
 $msg_err = ''
 
 $err_code = ''
 
 $res = ''
 
 $debug = false
 
 $sqlcreate
 
 $sqlinit
 
 $log
 

Additional Inherited Members

- Static Public Attributes inherited from DbObj
static $savepoint = array()
 
static $lockpoint = array()
 
static $sqlStrict = null
 
- Protected Member Functions inherited from DbObj
 tryCreate ()
 

Detailed Description

getRawValue($id) getAttribute($a) canEdit control($acl) addHistoryEntry($comment = '', $level = DocHisto::INFO)

Definition at line 54 of file Class.DocCtrl.php.

Constructor & Destructor Documentation

__construct (   $dbaccess = '',
  $id = '',
  $res = '',
  $dbid = 0 
)

Definition at line 174 of file Class.DocCtrl.php.

Member Function Documentation

addControl (   $uid,
  $aclname 
)

add control for a specific user

Parameters
int$uiduser identifier
string$aclnamename of the acl (edit, view,...)
Returns
string error message (empty if no errors)

Definition at line 671 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

canEditMenu ( )

return MENU_ACTIVE if user can edit document

Returns
int

Definition at line 1093 of file Class.DocCtrl.php.

static canExecute (   $appname,
  $actname 
)
static

return MENU_ACTIVE if user can execute the specified action

Parameters
string$appnameapplication name
string$actnameaction name
Returns
int

Definition at line 1077 of file Class.DocCtrl.php.

computeDProfil (   $dprofid = 0,
  $fromdocidvalues = null 
)

reset right for dynamic profil

Parameters
int$dprofididentifier for dynamic profil document
Doc$fromdocidvaluesother document to reference dynamic profiling (default itself)
Returns
string error message

Definition at line 387 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

controlAclAccess (   $acl)

return MENU_ACTIVE if user can view or modify access in a profil document

Parameters
string$aclacl name
Returns
int

Definition at line 1106 of file Class.DocCtrl.php.

controlActifProfil ( )

return MENU_ACTIVE if profil is actvate

Returns
int

Definition at line 1118 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

controlExtId (   $docid,
  $aclname,
  $strict = false 
)

use to know if current user has access privilege

Parameters
int$docidprofil identifier
string$aclnamename of the acl (edit, view,...)
bool$strictset to true to not use substitute
Returns
string if empty access granted else error message

Definition at line 747 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

controlId (   $docid,
  $aclname,
  $strict = false 
)

use to know if current user has access privilege

Parameters
int$docidprofil identifier
string$aclnamename of the acl (edit, view,...)
bool$strictset to true to not use substitute
Returns
string if empty access granted else error message

Definition at line 718 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

controlUp (   $uperm,
  $aclname 
)

use to know if permission has access privilege

Parameters
int$upermpermission mask
string$aclnamename of the acl (edit, view,...)
Returns
string if empty access granted else error message

Definition at line 782 of file Class.DocCtrl.php.

controlUserId (   $docid,
  $uid,
  $aclname 
)

use to know if current user has access privilege

Parameters
int$docidprofil identifier
int$uiduser identifier
string$aclnamename of the acl (edit, view,...)
Returns
string if empty access granted else error message

Definition at line 763 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

delControl (   $uid,
  $aclname 
)

suppress control for a specific user

is not a negative control

Parameters
int$uiduser identifier
string$aclnamename of the acl (edit, view,...)
Returns
string error message (empty if no errors)

Definition at line 692 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

getUsersForAcl (   $aclname)

return all users which has a control for a document

Parameters
string$aclnamethe name of acl to search
Returns
array of the system users informations

Definition at line 795 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

isControlled ( )

Definition at line 190 of file Class.DocCtrl.php.

isDocLinked (   $title,
  $docid 
)

verify if a document title and its link are for the same document

Parameters
string$titledocument title use for verification
string$dociddocument identifier use for verification
Returns
array constraint response

Definition at line 966 of file Class.DocCtrl.php.

isExtendedAcl (   $aclname)

Definition at line 680 of file Class.DocCtrl.php.

static isFloat (   $x,
  $min = null,
  $max = null 
)
static

return true it is a number use for constraint

Parameters
float$xthe number to test
float$minthe minimum of the number (null to indicate no limit)
float$maxthe maximum of the number (null to indicate no limit)
Returns
array err if cannot match range

Definition at line 1023 of file Class.DocCtrl.php.

static isFutureDate (   $date)
static

return true if the date is in the future (one day after at less)

Parameters
string$datedate JJ/MM/AAAA or AAAA-MM-DD
Returns
array

Definition at line 933 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

static isInteger (   $x,
  $min = null,
  $max = null 
)
static

return true it is a integer use for constraint

Parameters
float$xthe number to test
float$minthe minimum of the number (null to indicate no limit)
float$maxthe maximum of the number (null to indicate no limit)
Returns
array err if cannot match range

Definition at line 1040 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

isRealProfile ( )

return true if document is profile document PDOC, PDIR, ...

Returns
bool

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

static isString (   $x,
  $p 
)
static

return true if string match regexp

Parameters
string$x
string$pregexp pattern
Returns
array|string constraint response

Definition at line 1062 of file Class.DocCtrl.php.

isValidLink (   $title,
  $docid 
)

verify if a link of document is alive

Parameters
string$titledocument title use for verification
string$dociddocument identifier use for verification
Returns
array constraint response

Definition at line 993 of file Class.DocCtrl.php.

modifyControl (   $uid,
  $aclname,
  $deletecontrol = false 
)

modify control for a specific user

Parameters
int$uiduser identifier
string$aclnamename of the acl (edit, view,...)
bool$deletecontrolset true if want delete a control
Returns
string error message (empty if no errors)

Definition at line 637 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

static parseMail (   $Email)
static

Definition at line 905 of file Class.DocCtrl.php.

profilIsActivate (   $yes = true)

return MENU_ACTIVE if user can view or modify access in a profil document

Parameters
string | bool$yesif "false" invert return
Returns
int

Definition at line 1129 of file Class.DocCtrl.php.

recomputeProfiledDocument ( )

apply computeDProfil in all documents with this profile

Api expose:
to force apply profiling
Returns
void

Definition at line 848 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

removeControl (   $userid = - 1)

Unset all Acl for document (for everybody)

Parameters
int$useriduser system identifier
Returns
string

Definition at line 211 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

setControl (   $userctrl = true)

activate access specific control

Parameters
bool$userctrlif true add all acls for current user
Returns
string

Definition at line 230 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

setCvid (   $cvid)

set control view for document

Parameters
int$cvididentifier for control view document

Definition at line 705 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

setProfil (   $profid,
  $fromdocidvalues = null 
)

set profil for document

Parameters
int$profididentifier for profil document
Doc$fromdocidvalues
Returns
string

Definition at line 263 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

setViewProfil ( )

recompute view vector privilege

Definition at line 516 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

unsetControl ( )

Definition at line 195 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

Field Documentation

$attributes = null

Definition at line 142 of file Class.DocCtrl.php.

$cvid

Definition at line 159 of file Class.DocCtrl.php.

$dacls

Definition at line 60 of file Class.DocCtrl.php.

$doctype

Definition at line 143 of file Class.DocCtrl.php.

$dprofid

Definition at line 137 of file Class.DocCtrl.php.

$extendedAcls = array()

Definition at line 129 of file Class.DocCtrl.php.

$id

Definition at line 147 of file Class.DocCtrl.php.

$initid

Definition at line 151 of file Class.DocCtrl.php.

$profid

Definition at line 133 of file Class.DocCtrl.php.

$title = ''

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

$uperm

Definition at line 155 of file Class.DocCtrl.php.

$userid

Definition at line 167 of file Class.DocCtrl.php.

$views

Definition at line 138 of file Class.DocCtrl.php.


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