Platform  3.1
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 ()
 
 setControl ($userctrl=true)
 
 setProfil ($profid, $fromdocidvalues=0)
 
 computeDProfil ($dprofid=0, $fromdocidvalues=0)
 
 modifyControl ($uid, $aclname, $deletecontrol=false, $negativecontrol=false)
 
 addControl ($uid, $aclname, $negativecontrol=false)
 
 delControl ($uid, $aclname, $negativecontrol=false)
 
 setCvid ($cvid)
 
 controlId ($docid, $aclname)
 
 controlUserId ($docid, $uid, $aclname)
 
 controlUp ($uperm, $aclname)
 
 getUsersForAcl ($aclname)
 
 recomputeProfiledDocument ()
 
 isDocLinked ($title, $docid)
 
 isValidLink ($title, $docid)
 
 canEditMenu ()
 
 controlAclAccess ($acl)
 
 controlActifProfil ()
 
 profilIsActivate ($yes=true)
 
 isRealProfile ()
 
- Public Member Functions inherited from DocLDAP
 OrgInit ()
 
 UseLdap ()
 
 SetLdapParam ()
 
 getDNs ()
 
 setDNs ($ds, $tdn)
 
 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)
 
 Affect ($array)
 
 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 ()
 
 savePoint ($point)
 
 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

 $isCacheble = false
 
 $dacls
 
- Data Fields inherited from DocLDAP
 $serveur
 
 $port
 
 $racine
 
 $rootdn
 
 $rootpw
 
- Data Fields inherited from DbObj
 $dbid = - 1
 
 $dbaccess = ''
 
 $fields
 
 $dbtable = ''
 
 $criterias = array()
 
 $sup_fields = array()
 
 $sup_where = array()
 
 $sup_tables = array()
 
 $fulltextfields = array()
 
 $order_by = ""
 
 $isset = false
 
 $msg_err = ''
 
 $err_code = ''
 
 $res = null
 
 $debug = false
 

Additional Inherited Members

- Static Public Attributes inherited from DbObj
static $savepoint = array()
 

Detailed Description

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

Constructor & Destructor Documentation

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

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

Member Function Documentation

addControl (   $uid,
  $aclname,
  $negativecontrol = false 
)

add control for a specific user

Parameters
intuid user identificator
string$aclnamename of the acl (edit, view,...)
bool$negativecontrolset true if want add a negative control (explicit no permission)
Returns
string error message (empty if no errors)

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

canEditMenu ( )

return MENU_ACTIVE if user can edit document

Parameters
string$appnameapplication name
string$actnameaction name
Returns
int

Definition at line 773 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 758 of file Class.DocCtrl.php.

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

reset right for dynamic profil

Parameters
intdprofid identificator for dynamic profil document

Definition at line 237 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 786 of file Class.DocCtrl.php.

controlActifProfil ( )

return MENU_ACTIVE if profil is actvate

Returns
int

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

+ Here is the call graph for this function:

controlId (   $docid,
  $aclname 
)

use to know if current user has access privilege

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

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

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 486 of file Class.DocCtrl.php.

controlUserId (   $docid,
  $uid,
  $aclname 
)

use to know if current user has access privilege

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

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

+ Here is the call graph for this function:

delControl (   $uid,
  $aclname,
  $negativecontrol = false 
)

suppress control for a specific user

is not a negative control

Parameters
intuid user identificator
string$aclnamename of the acl (edit, view,...)
bool$negativecontrolset true if want suppress a negative control
Returns
string error message (empty if no errors)

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

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 499 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

isControlled ( )

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

isDocLinked (   $title,
  $docid 
)

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

Parameters
stringdocument title use for verification
stringdocument identificator use for verification

Definition at line 655 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 711 of file Class.DocCtrl.php.

static isFutureDate (   $date)
static

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

Parameters
stringdate date JJ/MM/AAAA

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

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 728 of file Class.DocCtrl.php.

+ Here is the call graph for this function:

isRealProfile ( )

Check if the document is a real profile.

Returns
bool true if the document is a profile, false if not a profile

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

static isString (   $x,
  $p 
)
static

return true it is a number

Parameters
stringdate date JJ/MM/AAAA

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

isValidLink (   $title,
  $docid 
)

verify if a link of document is alive

Parameters
stringdocument title use for verification
stringdocument identificator use for verification

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

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

modify control for a specific user

Parameters
intuid user identificator
string$aclnamename of the acl (edit, view,...)
bool$deletecontrolset true if want delete a control
bool$negativecontrolset true if want add a negative control (explicit no permission)
Returns
string error message (empty if no errors)

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

+ Here is the call graph for this function:

static parseMail (   $Email)
static

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

profilIsActivate (   $yes = true)

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

Parameters
string$aclacl name
Returns
int

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

recomputeProfiledDocument ( )

apply computeDProfil in all documents with this profile

Returns
void

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

removeControl ( )

Unset all Acl for document (for everybody)

Definition at line 155 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

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

+ Here is the call graph for this function:

setCvid (   $cvid)

set control view for document

Parameters
intcvid identificator for control view document

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

+ Here is the call graph for this function:

setProfil (   $profid,
  $fromdocidvalues = 0 
)

set profil for document

Parameters
intprofid identificator for profil document

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

+ Here is the call graph for this function:

unsetControl ( )

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

+ Here is the call graph for this function:

Field Documentation

$dacls

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

$isCacheble = false

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


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