AccountProfilePersistenceManager
in package
Manages the persistence of account profiles.
Table of Contents
- $strategy : AccountProfilePersistenceStrategy
- __construct() : mixed
- Constructor
- 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.
- installAccountProfileTemplates() : mixed
- Installs templates to the given server profile.
- 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.
- isValidAccountProfileName() : bool
- Returns if the given profile name is valid.
Properties
$strategy
private
AccountProfilePersistenceStrategy
$strategy
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —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
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
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
Return values
array<string|int, mixed> —names
getAccountProfileTemplateNames()
Returns the names of existing account profile templates.
public
getAccountProfileTemplateNames() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —scope => names (e.g. array('user' => array('default')))
installAccountProfileTemplates()
Installs templates to the given server profile.
public
installAccountProfileTemplates(string $confName) : mixed
Parameters
- $confName : string
-
server profile name
Tags
Return values
mixed —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
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
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
Return values
array<string|int, mixed> —template data
writeAccountProfile()
Writes an account profile.
public
writeAccountProfile( $typeId, string $name, string $confName, array<string|int, mixed> $data) : void
Parameters
- $typeId :
-
$scope
- $name : string
-
account profile name
- $confName : string
-
server profile name
- $data : array<string|int, mixed>
-
profile data
Tags
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
Return values
void —isValidAccountProfileName()
Returns if the given profile name is valid.
private
isValidAccountProfileName(string $name) : bool
Parameters
- $name : string
-
profile name
Return values
bool —is valid profile