Methods |
public
|
__construct(null|string $site, array $new = [], array $validatorOptions = [])
Parameters
$site |
site
|
$new |
new runtime service values, name => conf
|
$validatorOptions |
validator options
|
|
#
|
public
|
getDefaultConfiguration(string $svc = null): array
|
#
|
public
|
getNewConfiguration(string $svc = null): array
Get pending configuration Not present on deletion
Get pending configuration Not present on deletion
|
#
|
public
|
getOldConfiguration(string $svc = null): array
Get prior configuration Not present on creation
Get prior configuration Not present on creation
|
#
|
public
|
getCurrentConfiguration(string $svc = null): array
Get current site configuration
Get current site configuration
|
#
|
public
static
|
import(Auth_Info_User $user): SiteConfiguration
Create instance from context
Create instance from context
|
#
|
public
static
|
shallow(Auth_Info_User $user): static
Create shallow instance Used for templating in an unprivileged environment
Create shallow instance Used for templating in an unprivileged environment
|
#
|
public
static
|
getModuleRemap(string $name): string
Get remapped module name on platform change
Get remapped module name on platform change
Returns
remapped name if supported or $name
|
#
|
public
static
|
prioritizeAllModules(): array
Build simple module priority listing from all modules
Build simple module priority listing from all modules
|
#
|
public
|
hasValidatorOption(string $option): mixed|null
|
#
|
public
|
getValidatorOption(string $option, $default = null)
|
#
|
public
|
__call(string $function, array $args = null)
|
#
|
public
|
getSiteFunctionInterceptor(): Module_Skeleton
|
#
|
public
|
getAuthContext(): Auth_Info_User
|
#
|
public
|
canInstantiateInterceptor(): bool
Account is sufficiently provisioned to create afi instance
Account is sufficiently provisioned to create afi instance
|
#
|
public
|
getSiteId(): int
|
#
|
public
|
toArray()
Get the instance as an array.
Get the instance as an array.
Implements
|
#
|
public
|
setPlanName(string $plan): self
|
#
|
public
|
getPlanName(): null|string
|
#
|
public
|
migrateConfiguration(string $from = 'current', string $to = 'old'): bool
Parameters
$from |
from service path
|
$to |
to service path
|
|
#
|
public
|
getServiceValue(string $svc, string $name, mixed $default = null): mixed
Get composite service value new => old => default => $default parameter
Get composite service value new => old => default => $default parameter
Parameters
$svc |
service class
|
$name |
service name
|
$default |
default value
|
|
#
|
public
|
cleanService(string $svc): bool
Remove journaled service configuration
Remove journaled service configuration
Parameters
|
#
|
public
|
verifyAll(): bool
|
#
|
public
static
|
buildModuleDependencies(array $modules): array
Get dependency map from modules
Get dependency map from modules
Parameters
|
#
|
public
static
|
getModuleFromService(string $svc): null|string
Get module name from configuration service
Get module name from configuration service
|
#
|
public
|
makeConfigurationContext(string $service): ConfigurationContext
|
#
|
public
|
verify(string $svc, ConfigurationContext $ctx): bool
Verify individual service configuration
Verify individual service configuration
Parameters
$svc |
service name
|
$ctx |
configuration context
|
|
#
|
public
|
forceReconfiguration()
|
#
|
public
|
writePendingConfiguration(): bool
Write pending configuration to account meta
Write pending configuration to account meta
|
#
|
public
|
write(string $ctype, array[] $config): bool
Parameters
$ctype |
configuration type [old, new, cur]
|
$config |
service configuration
|
|
#
|
public
|
releaseOnShutdown(): void
Delete configuration storage on exit
Delete configuration storage on exit
|
#
|
public
|
getSite(): string
|
#
|
public
|
getServices(): array
|
#
|
public
|
getAccountRoot(): string
|
#
|
public
|
getEventArgs()
|
#
|
Constants |
public
|
|
STRICT_INTERPRETATION = OPCENTER_STRICT_SVC_CONFIG
|
#
|
public
|
|
DEFAULT_SVC_NAME = OPCENTER_DEFAULT_PLAN
|
#
|
public
|
|
HOOK_ID = 'service'
|
#
|
public
|
|
RESERVED_SITE = 'site0'
|
#
|
public
|
|
MODULE_REMAP = [
'bind' => 'dns',
'sendmail' => 'mail',
'openssl' => 'ssl',
'majordomo' => 'mlist',
'proftpd' => 'ftp',
'weblogs' => 'logs',
]
backwards compatibility with older platforms
backwards compatibility with older platforms
|
#
|
public
|
|
MODULE_CLASS_MAP = [
'siteinfo' => 'site',
'quota' => 'diskquota',
'mail' => 'email',
'mlist' => 'majordomo',
'apache' => 'web',
'ipinfo6' => 'ipinfo',
'vacation' => 'email',
'users' => 'user',
'files' => 'file',
'logrotate' => 'logs',
'metrics' => 'telemetry',
]
|
#
|
public
|
|
RESET_IGNORED_FIELDS = [
'siteinfo',
'ipinfo',
'ipinfo6',
'dns.proxy6addr',
'dns.proxyaddr',
'dns.key',
'dns.provider',
'mail.provider',
'mail.key',
'apache.webuser',
]
fields ignored when calling --reset
fields ignored when calling --reset
|
#
|
public
|
|
RESET_NULLABLE_OK = [
'aliases.max',
'apache.subnum',
'cgroup',
'diskquota',
'mlist.max',
'mysql.dbasenum',
'pgsql.dbasenum',
'rampart.max',
'users.max',
]
fields when null are applied in --reset
fields when null are applied in --reset
|
#
|