Public Member Functions | Public Attributes

TransactionComponent Class Reference

Transaction component. More...

List of all members.

Public Member Functions

 __construct ($dbConfigName= 'default', $pathTmp= '/tmp')
 init ($dbConfigName= 'default', $pathTmp= '/tmp')
 started ()
 begin ()
 Start a transaction.
 end ()
 End a transaction.
 commit ()
 Commit a transaction.
 rollback ()
 Rollback a transaction.
 makeFromData ($path, &$arrData)
 Create a file in $path from data $arrData.
 makeFromFile ($path, $pathFileSource)
 Create a new file, from an old one.
 replaceData ($path, &$arrDati)
 Replace data in file.
 rm ($path)
 Remove a file.
 mv ($newPath, $pathSource)
 Move a file.
 cp ($newPath, $pathSource)
 Copy a file.
 mkdir ($newDir, $mode=0775)
 Create a directory.
 rmdir ($rmDir)
 Remove a directory.
 mvDir ($pathNewParent, $oldPath)
 Move a directory and its content.

Public Attributes

const INIT = 0
const START = 10
const ROLLBACK = 20
const COMMIT = 30

Detailed Description

Transaction component.

Version:
$Revision$ $LastChangedBy$ $LastChangedDate$

$Id$

Definition at line 32 of file transaction.php.


Member Function Documentation

TransactionComponent::begin (  ) 

Start a transaction.

Returns:
boolean

Definition at line 68 of file transaction.php.

TransactionComponent::commit (  ) 

Commit a transaction.

Returns:
boolean

Definition at line 98 of file transaction.php.

Referenced by end().

TransactionComponent::cp ( newPath,
pathSource 
)

Copy a file.

Parameters:
string $newPath
string $pathSource
Returns:
boolean

Definition at line 223 of file transaction.php.

TransactionComponent::end (  ) 

End a transaction.

Returns:
boolean
Exceptions:
BeditatException 

Definition at line 83 of file transaction.php.

References commit().

TransactionComponent::makeFromData ( path,
&$  arrData 
)

Create a file in $path from data $arrData.

Parameters:
string $path path to new file
string $arrData data for file
Returns:
string

Definition at line 169 of file transaction.php.

TransactionComponent::makeFromFile ( path,
pathFileSource 
)

Create a new file, from an old one.

Parameters:
string $path path of the new file
string $pathFileSource source file
Returns:
string

Definition at line 180 of file transaction.php.

TransactionComponent::mkdir ( newDir,
mode = 0775 
)

Create a directory.

Parameters:
string $newDir
int $mode
Returns:
boolean

Definition at line 234 of file transaction.php.

TransactionComponent::mv ( newPath,
pathSource 
)

Move a file.

Parameters:
string $newPath
string $pathSource
Returns:
boolean

Definition at line 212 of file transaction.php.

TransactionComponent::mvDir ( pathNewParent,
oldPath 
)

Move a directory and its content.

Parameters:
string $pathNewParent
string $oldPath
Returns:
string

Definition at line 255 of file transaction.php.

TransactionComponent::replaceData ( path,
&$  arrDati 
)

Replace data in file.

Parameters:
string path file
string $arrDati data
Returns:
boolean

Definition at line 191 of file transaction.php.

TransactionComponent::rm ( path  ) 

Remove a file.

Parameters:
string $path
Returns:
boolean

Definition at line 201 of file transaction.php.

TransactionComponent::rmdir ( rmDir  ) 

Remove a directory.

Parameters:
string $rmDir
Returns:
boolean

Definition at line 244 of file transaction.php.

TransactionComponent::rollback (  ) 

Rollback a transaction.

Returns:
boolean
Exceptions:
BeditaException 
Exception 

Definition at line 117 of file transaction.php.


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:47 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus