FusionDirectory
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.
 
 enabled ()
 Check if the snapshot is enable. More...
 
 hasDeletedSnapshots ($bases)
 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, string $description, string $objectType, string $snapshotSource='FD')
 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 32 of file class_SnapshotHandler.inc.

Member Function Documentation

◆ createSnapshot()

createSnapshot (   $dn,
string  $description,
string  $objectType,
string  $snapshotSource = 'FD' 
)

Create a snapshot of the current object.

Parameters
string$dnThe DN
string$descriptionSnapshot description
string$objectTypeType of snapshotted object
string$snapshotSourcesource of the data.

Definition at line 203 of file class_SnapshotHandler.inc.

References logging\debug(), and enabled().

◆ enabled()

enabled ( )

Check if the snapshot is enable.

Returns
boolean TRUE if is enable, return FALSE otherwise

Definition at line 78 of file class_SnapshotHandler.inc.

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

◆ getAllDeletedSnapshots()

getAllDeletedSnapshots (   $base_of_object)

Get all deleted snapshots.

Parameters
string$base_of_object

Definition at line 404 of file class_SnapshotHandler.inc.

References enabled().

Referenced by hasDeletedSnapshots().

◆ getAvailableSnapsShots()

getAvailableSnapsShots (   $dn)

Get the available snapshots.

Returns
available snapshots for the given base

Definition at line 366 of file class_SnapshotHandler.inc.

References enabled().

◆ getSnapshots()

getSnapshots (   $dn,
  $raw = FALSE 
)

Get snapshots.

Parameters
string$dnThe DN
string$rawFALSE

Definition at line 148 of file class_SnapshotHandler.inc.

References enabled().

◆ hasSnapshots()

hasSnapshots (   $dn)

Check if the DN has snapshots.

Returns
the numbers of snapshots

Definition at line 136 of file class_SnapshotHandler.inc.

◆ removeSnapshot()

removeSnapshot (   $dn)

Remove a snapshot.

Parameters
string$dnThe DN

Definition at line 348 of file class_SnapshotHandler.inc.

◆ restoreSnapshot()

restoreSnapshot (   $dn)

Restore selected snapshot.

Parameters
string$dnThe DN

Definition at line 451 of file class_SnapshotHandler.inc.

References logging\debug(), and enabled().


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