FusionDirectory
 All Data Structures Files Functions Variables
Public Member Functions
SnapshotHandler Class Reference

This class contains all the function needed to handle the snapshot functionality. More...

Public Member Functions

 __construct ()
 Create handler. More...
 
 enabled ()
 Check if the snapshot is enable. More...
 
 setSnapshotBases ($bases)
 Set a new snapshot bases. More...
 
 getSnapshotBases ()
 Get the current snapshot bases. More...
 
 hasDeletedSnapshots ()
 Check if there are deleted snapshots.
 
 initSnapshotCache ($base)
 Cache Snapshot information for all objects in $base.
 
 hasSnapshots ($dn)
 Check if the DN has snapshots. More...
 
 getSnapshots ($dn, $raw=FALSE)
 Get snapshots. More...
 
 createSnapshot ($dn, $description=array())
 Create a snapshot of the current object. More...
 
 removeSnapshot ($dn)
 Remove a snapshot. More...
 
 getAvailableSnapsShots ($dn)
 Get the available snapshots. More...
 
 getAllDeletedSnapshots ($base_of_object)
 Get all deleted snapshots. More...
 
 restoreSnapshot ($dn)
 Restore selected snapshot. More...
 

Detailed Description

This class contains all the function needed to handle the snapshot functionality.

Definition at line 31 of file class_SnapshotHandler.inc.

Constructor & Destructor Documentation

__construct ( )

Create handler.

Parameters
config$config

Definition at line 42 of file class_SnapshotHandler.inc.

References msg_dialog\display(), enabled(), and msgPool\ldaperror().

Member Function Documentation

createSnapshot (   $dn,
  $description = array() 
)

Create a snapshot of the current object.

Parameters
string$dnThe DN
array$descriptionSnapshot description

Definition at line 204 of file class_SnapshotHandler.inc.

References DEBUG(), msg_dialog\display(), enabled(), and msgPool\ldaperror().

enabled ( )

Check if the snapshot is enable.

Returns
boolean TRUE if is enable, return FALSE otherwise

Definition at line 63 of file class_SnapshotHandler.inc.

Referenced by __construct(), createSnapshot(), getAllDeletedSnapshots(), getAvailableSnapsShots(), getSnapshots(), initSnapshotCache(), and restoreSnapshot().

getAllDeletedSnapshots (   $base_of_object)

Get all deleted snapshots.

Parameters
string$base_of_object
boolean$rawFALSE

Definition at line 333 of file class_SnapshotHandler.inc.

References enabled().

Referenced by hasDeletedSnapshots().

getAvailableSnapsShots (   $dn)

Get the available snapshots.

Returns
available snapshots for the given base

Definition at line 293 of file class_SnapshotHandler.inc.

References enabled().

getSnapshotBases ( )

Get the current snapshot bases.

Returns
array $bases

Definition at line 83 of file class_SnapshotHandler.inc.

Referenced by hasDeletedSnapshots().

getSnapshots (   $dn,
  $raw = FALSE 
)

Get snapshots.

Parameters
string$dnThe DN
string$rawFALSE

Definition at line 153 of file class_SnapshotHandler.inc.

References enabled().

hasSnapshots (   $dn)

Check if the DN has snapshots.

Returns
the numbers of snapshots

Definition at line 141 of file class_SnapshotHandler.inc.

removeSnapshot (   $dn)

Remove a snapshot.

Parameters
string$dnThe DN

Definition at line 277 of file class_SnapshotHandler.inc.

References msg_dialog\display(), and msgPool\ldaperror().

restoreSnapshot (   $dn)

Restore selected snapshot.

Parameters
string$dnThe DN

Definition at line 381 of file class_SnapshotHandler.inc.

References DEBUG(), msg_dialog\display(), enabled(), and msgPool\ldaperror().

setSnapshotBases (   $bases)

Set a new snapshot bases.

Parameters
array$bases

Definition at line 73 of file class_SnapshotHandler.inc.


The documentation for this class was generated from the following file: