LDAP Account Manager

AccountProfilePersistenceStrategyFiles
in package
implements AccountProfilePersistenceStrategy

Manages account profiles on file system.

Interfaces, Classes, Traits and Enums

AccountProfilePersistenceStrategy
Reads and writes account profiles.

Table of Contents

deleteAccountProfile()  : void
Deletes an account profile.
deleteAccountProfileTemplate()  : void
Deletes an account profile template.
getAccountProfileNames()  : array<string|int, mixed>
Returns all account profile names for the given type id.
getAccountProfileTemplateNames()  : array<string|int, mixed>
Returns the names of existing account profile templates.
isAccountProfileExisting()  : bool
Checks if the given profile is already existing.
loadAccountProfile()  : array<string|int, mixed>
Loads an account profile.
loadAccountProfileTemplate()  : array<string|int, mixed>
Reads an account profile template.
writeAccountProfile()  : void
Writes an account profile.
writeAccountProfileTemplate()  : void
Writes an account profile template.
getAccountProfileFileName()  : string
Returns the file name of a global template.
getAccountProfileTemplateFileName()  : string
Returns the file name of a global template.
readAccountProfileFile()  : array<string|int, mixed>
Reads an account profile from the given file name.
writeAccountProfileDataToFile()  : void
Writes the profile data to the given file.

Methods

deleteAccountProfile()

Deletes an account profile.

public deleteAccountProfile(string $typeId, string $name, string $confName) : void
Parameters
$typeId : string

user/group/host

$name : string

account profile name

$confName : string

server profile name

Tags
inheritDoc
Return values
void

deleteAccountProfileTemplate()

Deletes an account profile template.

public deleteAccountProfileTemplate(string $scope, string $name) : void
Parameters
$scope : string

user/group/host

$name : string

account profile name

Tags
inheritDoc
Return values
void

getAccountProfileNames()

Returns all account profile names for the given type id.

public getAccountProfileNames(string $typeId, string $confName) : array<string|int, mixed>
Parameters
$typeId : string

type ID

$confName : string

server profile name

Tags
inheritDoc
Return values
array<string|int, mixed>

names

getAccountProfileTemplateNames()

Returns the names of existing account profile templates.

public getAccountProfileTemplateNames() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

scope => names (e.g. array('user' => array('default')))

isAccountProfileExisting()

Checks if the given profile is already existing.

public isAccountProfileExisting(string $typeId, string $name, string $confName) : bool
Parameters
$typeId : string

user/group/host

$name : string

profile name

$confName : string

server profile name

Tags
inheritDoc
Return values
bool

profile exists

loadAccountProfile()

Loads an account profile.

public loadAccountProfile(string $typeId, string $name, string $confName) : array<string|int, mixed>
Parameters
$typeId : string

user/group/host

$name : string

account profile name

$confName : string

server profile name

Tags
inheritDoc
Return values
array<string|int, mixed>

profile data

loadAccountProfileTemplate()

Reads an account profile template.

public loadAccountProfileTemplate(string $scope, string $name) : array<string|int, mixed>
Parameters
$scope : string

account type

$name : string

template name

Tags
inheritDoc
Return values
array<string|int, mixed>

template data

writeAccountProfile()

Writes an account profile.

public writeAccountProfile(string $typeId, string $name, string $confName, array<string|int, mixed> $data) : void
Parameters
$typeId : string

account type ID

$name : string

profile name

$confName : string

server profile name

$data : array<string|int, mixed>

profile data

Tags
inheritDoc
Return values
void

writeAccountProfileTemplate()

Writes an account profile template.

public writeAccountProfileTemplate(string $scope, string $name, array<string|int, mixed> $data) : void
Parameters
$scope : string

account type

$name : string

template name

$data : array<string|int, mixed>

profile data

Tags
inheritDoc
Return values
void

getAccountProfileFileName()

Returns the file name of a global template.

private getAccountProfileFileName(string $typeId, string $name, string $confName) : string
Parameters
$typeId : string

e.g. user

$name : string

profile name

$confName : string

server profile name

Return values
string

file name

getAccountProfileTemplateFileName()

Returns the file name of a global template.

private getAccountProfileTemplateFileName(string $scope, string $name) : string
Parameters
$scope : string

e.g. user

$name : string

profile name

Return values
string

file name

readAccountProfileFile()

Reads an account profile from the given file name.

private readAccountProfileFile(string $fileName) : array<string|int, mixed>
Parameters
$fileName : string

file name

Tags
throws
LAMException

error reading file

Return values
array<string|int, mixed>

hash array (attribute => value)

writeAccountProfileDataToFile()

Writes the profile data to the given file.

private writeAccountProfileDataToFile(string $fileName, array<string|int, mixed> $data) : void
Parameters
$fileName : string

file name

$data : array<string|int, mixed>

profile data

Tags
throws
LAMException

error writing file

Return values
void

Search results