Class ACLDatabase

Description

ACLDatabase class manages the ACLbit backup database. It uses SQLite3 database to save and query ACLs.

Located in /aclbit.php (line 168)


	
			
Class Constant Summary
 NON_RECURSIVE = FALSE
 RECURSIVE = TRUE
Method Summary
ACLDatabase __construct (string $dbPath)
void create ( $prefix)
void dumpNextEntry (string $path, bool $recursive)
void getEntries ()
void getRoots ()
void removeRoot (string $rootPath)
void resetRoot (string $rootPath)
void rootAncestorPath ( $path)
void rootDescendantPath ( $rootPath)
void save (array $entry)
void saveCompleted ()
array searchGroupNextRecord ( $groupId)
void searchUserNextRecord (int $userId, string $userGroups)
Methods
Constructor __construct (line 205)

Constructor connects to database and inititalizes the database structure.

  • access: public
ACLDatabase __construct (string $dbPath)
  • string $dbPath: Path to a file with the SQLite database.
create (line 298)

Initializes the database structure.

  • access: public
void create ( $prefix)
  • $prefix
dumpNextEntry (line 575)

Returns the next entry from the set of all entries stored for path and for its subtree, eventually.

  • access: public
void dumpNextEntry (string $path, bool $recursive)
  • string $path: Path to a file/directory whose entry we want to get.
  • bool $recursive: True to get entries for the subtree, false to get entry for the path only.
getEntries (line 291)

Return number of entries modified.

  • access: public
void getEntries ()
getRoots (line 906)

Returns all backed up roots.

  • access: public
void getRoots ()
removeRoot (line 405)

Removes root and associated ACL entries from database.

  • access: public
void removeRoot (string $rootPath)
  • string $rootPath: Absolute path to the backup root.
resetRoot (line 420)

Resets database for the backup root given. Deletes old entries and makes sure the backup root is in the root table.

  • access: public
void resetRoot (string $rootPath)
  • string $rootPath: Absolute path to the backup root.
rootAncestorPath (line 361)

Returns ancestor or equal path of the specified path that is already stored in database, or false.

  • access: public
void rootAncestorPath ( $path)
  • $path
rootDescendantPath (line 369)

Returns descendant or equal path of the specified root that is already stored in database.

  • access: public
void rootDescendantPath ( $rootPath)
  • $rootPath
save (line 518)

Stores a complete ACL entry.

  • access: public
void save (array $entry)
  • array $entry: An ACL file entry stored in an array.
saveCompleted (line 552)

Actions to take after all entries are saved during backup.

  • access: public
void saveCompleted ()
searchGroupNextRecord (line 723)

Returns rights records for the given group.

  • return: Array(
    • file => filename
    • rights => integer rights
    )
  • access: public
array searchGroupNextRecord ( $groupId)
  • $groupId
searchUserNextRecord (line 798)

Returns next record with effective rights for the user and (its) groups. Skips redundant rights records, i.e. records with rights that are the same as rights in parent folder.

  • access: public
void searchUserNextRecord (int $userId, string $userGroups)
  • int $userId: Id of a user to search the rights for.
  • string $userGroups: Comma-delimited list of ids of groups the user is member of.
Class Constants
BACKUP_BLOCK_SIZE = 50000 (line 198)

Number of entries that make up a block. When in-memory table contains BACKUP_BLOCK_SIZE entries, it is copied to the disk.

NON_RECURSIVE = FALSE (line 565)

Constant to call ACLDatabase::dumpNextEntry() with.

RECURSIVE = TRUE (line 560)

Constant to call ACLDatabase::dumpNextEntry() with.

Documentation generated on Wed, 30 Apr 2008 08:38:20 +0200 by phpDocumentor 1.4.0