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

Public Member Functions

 __construct ()
 
 useCollection (DocumentList &$l)
 
 addRevision ($revisionComment= '')
 
 addHistoryComment ($historyComment= '')
 
 useTransaction ($transaction=true)
 
 setStatusFile ($statusFile)
 
 useProfileUpdating ($profiling=true)
 
 getError ()
 
 setValue ($attrid, $newValue)
 
 replaceValue ($attrid, $oldValue, $newValue)
 
 addValue ($attrid, $valueToAdd)
 
 removeValue ($attrid, $valueToRemove)
 
 logStatus ($s)
 
 bgSetValue ($attrid, $newValue)
 
 bgAddValue ($attrid, $valueToAdd)
 
 bgRemoveValue ($attrid, $valueToRemove)
 
 bgReplaceValue ($attrid, $oldValue, $newValue)
 
 getResults ()
 

Static Public Member Functions

static getInitIdFromName ($name)
 

Data Fields

 $dl = null
 

Protected Member Functions

 executeProfiling (array $ids)
 
 executeRevision (array $ids)
 
 executeHistory ($ids)
 
 logStatusReport ()
 

Detailed Description

Format document list to be easily used in

$s = new \SearchDoc('', "MY_FAMILY");
$s->setObjectReturn();
$fc = new \UpdateAttribute();
$fc->useCollection($dl);

Definition at line 24 of file Class.UpdateAttribute.php.

Constructor & Destructor Documentation

__construct ( )

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

+ Here is the call graph for this function:

Member Function Documentation

addHistoryComment (   $historyComment = '')

active revision before update documents

Parameters
string$historyComment
Returns
UpdateAttribute

Definition at line 93 of file Class.UpdateAttribute.php.

addRevision (   $revisionComment = '')

active revision before update documents

Parameters
string$revisionComment
Returns
UpdateAttribute

Definition at line 82 of file Class.UpdateAttribute.php.

addValue (   $attrid,
  $valueToAdd 
)

replace value by another for an document list attribute

Parameters
string$attridattribute id
string|\string[]$valueToAdd
Exceptions
Dcp\Upat\Exception

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

+ Here is the call graph for this function:

bgAddValue (   $attrid,
  $valueToAdd 
)

call ::addValue() in a background process the return filename can be use by UpdateAttributeStatus to see information trace from background process

See Also
UpdateAttributeStatus
Parameters
string$attridattribute id
string|\string[]$valueToAdd
Returns
string filename status

Definition at line 669 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

bgRemoveValue (   $attrid,
  $valueToRemove 
)

call ::removeValue() in a background process the return filename can be use by UpdateAttributeStatus to see information trace from background process

See Also
UpdateAttributeStatus
Parameters
string$attridattribute id
string|\string[]$valueToRemove
Returns
string filename status

Definition at line 691 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

bgReplaceValue (   $attrid,
  $oldValue,
  $newValue 
)

call ::replaceValue() in a background process the return filename can be use by UpdateAttributeStatus to see information trace from background process

See Also
UpdateAttributeStatus
Parameters
string$attridattribute id
string$oldValuevalue to replace
string|string[]$newValue new value to set for attribute
Returns
string filename status

Definition at line 714 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

bgSetValue (   $attrid,
  $newValue 
)

call ::setValue() in a background process the return filename can be use by UpdateAttributeStatus to see information trace from background process

See Also
UpdateAttributeStatus
Parameters
string$attrid
string|string[]$newValue
Returns
string filename status

Definition at line 647 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

executeHistory (   $ids)
protected

add history item for each document

Parameters
int[]$ids document identicators to process
Returns
void

Definition at line 192 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

executeProfiling ( array  $ids)
protected

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

+ Here is the call graph for this function:

executeRevision ( array  $ids)
protected

process a revision for each documents

Definition at line 162 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

getError ( )

Definition at line 131 of file Class.UpdateAttribute.php.

static getInitIdFromName (   $name)
static

fet initial document identifier from name

Parameters
string$name
Returns
int

Definition at line 616 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

getResults ( )
Returns
null|UpdateAttributeResults[]

Definition at line 731 of file Class.UpdateAttribute.php.

logStatus (   $s)

Definition at line 629 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

logStatusReport ( )
protected

Definition at line 514 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

removeValue (   $attrid,
  $valueToRemove 
)

replace value by another for an document list attribute

Parameters
string$attridattribute id
string|\string[]$valueToRemove
Exceptions
Dcp\Upat\Exception

Definition at line 525 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

replaceValue (   $attrid,
  $oldValue,
  $newValue 
)

replace value by another for an document list attribute

Parameters
string$attridattribute id
string$oldValuevalue to replace
string|string[]$newValue new value to set for attribute
Exceptions
Dcp\Upat\Exception

Definition at line 376 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

setStatusFile (   $statusFile)

use status file when use it in background processing

Parameters
string$statusFilefile path where partial status are written
Returns
UpdateAttribute

Definition at line 115 of file Class.UpdateAttribute.php.

setValue (   $attrid,
  $newValue 
)

change value of an attribute for docment list

Parameters
string$attridattribute id
string|string[]$newValue new value to set for attribute
Exceptions
Dcp\Upat\Exception

Definition at line 330 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

useCollection ( DocumentList $l)

document list to process

Parameters
DocumentList$l
Exceptions
Dcp\Upat\Exception
Returns
UpdateAttribute

Definition at line 70 of file Class.UpdateAttribute.php.

+ Here is the call graph for this function:

useProfileUpdating (   $profiling = true)

add post action to recompute profiling for each modified documents in case of dynamic attribute references

Parameters
bool$profiling
Returns
UpdateAttribute

Definition at line 125 of file Class.UpdateAttribute.php.

useTransaction (   $transaction = true)

all modification are done in a sql transaction if only one request failed, none documents are modified default no use transaction

Parameters
bool$transaction
Returns
UpdateAttribute

Definition at line 105 of file Class.UpdateAttribute.php.

Field Documentation

$dl = null

Definition at line 29 of file Class.UpdateAttribute.php.


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