implements |
Arrayable, Publisher |
---|---|
uses |
FilesystemPathTrait, apnscpFunctionInterceptorTrait |
Class SiteConfiguration
Service composition and validation
Service validation flow:
Methods | ||
---|---|---|
public
|
__construct(null|string $site, array $new = [], array $validatorOptions = [])
|
# |
public
|
getDefaultConfiguration(string $svc = null): array
|
# |
public
|
getNewConfiguration(string $svc = null): array
|
# |
public
|
getOldConfiguration(string $svc = null): array
|
# |
public
|
getCurrentConfiguration(string $svc = null): array
|
# |
public
static
|
import(Auth_Info_User $user): SiteConfiguration
|
# |
public
static
|
shallow(Auth_Info_User $user): static
|
# |
public
static
|
getModuleRemap(string $name): string
|
# |
public
static
|
prioritizeAllModules(): array
|
# |
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
|
# |
public
|
getSiteId(): int
|
# |
public
|
toArray()
|
# |
public
|
setPlanName(string $plan): self
|
# |
public
|
getPlanName(): null|string
|
# |
public
|
migrateConfiguration(string $from = 'current', string $to = 'old'): bool
|
# |
public
|
getServiceValue(string $svc, string $name, mixed $default = null): mixed
|
# |
public
|
cleanService(string $svc): bool
|
# |
public
|
verifyAll(): bool
|
# |
public
static
|
buildModuleDependencies(array $modules): array
|
# |
public
static
|
getModuleFromService(string $svc): null|string
|
# |
public
|
makeConfigurationContext(string $service): ConfigurationContext
|
# |
public
|
verify(string $svc, ConfigurationContext $ctx): bool
|
# |
public
|
forceReconfiguration()
|
# |
public
|
writePendingConfiguration(): bool
|
# |
public
|
write(string $ctype, array[] $config): bool
|
# |
public
|
releaseOnShutdown(): void
|
# |
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',
]
|
# |
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',
]
|
# |
public
|
RESET_NULLABLE_OK = [
'aliases.max',
'apache.subnum',
'cgroup',
'diskquota',
'mlist.max',
'mysql.dbasenum',
'pgsql.dbasenum',
'rampart.max',
'users.max',
]
|
# |