Documentation

pm_ProductInfo
in package

Plesk options / info

Tags
since
12.0

Table of Contents

ARCH_32  = 'i386'
ARCH_64  = 'x86_64'
HYPERSCALER_ALIBABA  = 'Alibaba'
HYPERSCALER_AMAZON  = 'AWS/Lightsail'
HYPERSCALER_AZURE  = 'Azure'
HYPERSCALER_DIGITALOCEAN  = 'DigitalOcean'
HYPERSCALER_GOOGLE  = 'GoogleCloud'
HYPERSCALER_VULTR  = 'Vultr'
OS_ALMALINUX  = 'AlmaLinux'
OS_CENTOS  = 'CentOS'
OS_CLOUDLINUX  = 'CloudLinux'
OS_DEBIAN  = 'Debian'
OS_REDHAT  = 'RedHat'
OS_ROCKY  = 'Rocky'
OS_UBUNTU  = 'Ubuntu'
OS_VZLINUX  = 'VZLinux'
OS_WINDOWS  = 'Microsoft Windows'
PACKAGE_TYPE_DEB  = 'deb'
PACKAGE_TYPE_RPM  = 'rpm'
PACKAGE_TYPE_WIN  = 'win'
PLATFORM_UNIX  = 'Unix'
PLATFORM_WINDOWS  = 'Windows'
VERSION_WINDOWS_2008R2  = '6.1'
VERSION_WINDOWS_2012  = '6.2'
VERSION_WINDOWS_2012R2  = '6.3'
VERSION_WINDOWS_2016  = '10.0'
VERSION_WINDOWS_2019  = '10.0.1809'
VIRT_DOCKER  = 'docker'
VIRT_HYPERV  = 'hyperv'
VIRT_KVM  = 'kvm'
VIRT_LXC  = 'lxc'
VIRT_NONE  = 'none'
VIRT_OPENVZ  = 'openvz'
VIRT_PARALLELS_SERVER  = 'parallels-server'
VIRT_VMWARE  = 'vmware'
VIRT_VZ  = 'vz'
VIRT_XEN  = 'xen'
getHWID()  : string
Get product HWID
getHyperscalerIpMapping()  : array<string|int, mixed>
Returns mapping of private IP addresses to public IP addresses as stated in instance metadata
getHyperscalerName()  : string|null
Returns the name of the hyperscaler ths instance is running on, or null if none was detected
getLastInstalledUpdate()  : string
Retrieve last installed update
getOsArch()  : string|null
Retrieve OS architecture
getOsCodename()  : string|null
Retrieve OS codename
getOsName()  : string|null
Retrieve OS name
getOsPackageType()  : string|null
Retrieve OS package type
getOsShortVersion()  : string|null
Retrieve OS short version
getOsVersion()  : string|null
Retrieve OS version
getPlatform()  : string
Retrieve platform name
getPrivateTempDir()  : string
Retrieve absolute path to temp directory.
getProductRootDir()  : string
Retrieve absolute path to root directory.
getVersion()  : string
Retrieve Plesk version
getVirtualization()  : array<string|int, mixed>|string
Retrieve virtualization type(s)
hasHyperscalerIpMapping()  : bool
Returns whether this is an instance of a hyperscaler that uses NAT with public/private addresses mapping
isUnix()  : bool
Check if platform is Unix
isWindows()  : bool
Check if platform is Windows

Constants

HYPERSCALER_ALIBABA

public mixed HYPERSCALER_ALIBABA = 'Alibaba'

HYPERSCALER_AMAZON

public mixed HYPERSCALER_AMAZON = 'AWS/Lightsail'

HYPERSCALER_AZURE

public mixed HYPERSCALER_AZURE = 'Azure'

HYPERSCALER_DIGITALOCEAN

public mixed HYPERSCALER_DIGITALOCEAN = 'DigitalOcean'

HYPERSCALER_GOOGLE

public mixed HYPERSCALER_GOOGLE = 'GoogleCloud'

HYPERSCALER_VULTR

public mixed HYPERSCALER_VULTR = 'Vultr'

OS_ALMALINUX

public mixed OS_ALMALINUX = 'AlmaLinux'

OS_CLOUDLINUX

public mixed OS_CLOUDLINUX = 'CloudLinux'

OS_WINDOWS

public mixed OS_WINDOWS = 'Microsoft Windows'

PACKAGE_TYPE_DEB

public mixed PACKAGE_TYPE_DEB = 'deb'

PACKAGE_TYPE_RPM

public mixed PACKAGE_TYPE_RPM = 'rpm'

PACKAGE_TYPE_WIN

public mixed PACKAGE_TYPE_WIN = 'win'

PLATFORM_WINDOWS

public mixed PLATFORM_WINDOWS = 'Windows'

VERSION_WINDOWS_2008R2

public mixed VERSION_WINDOWS_2008R2 = '6.1'

VERSION_WINDOWS_2012

public mixed VERSION_WINDOWS_2012 = '6.2'

VERSION_WINDOWS_2012R2

public mixed VERSION_WINDOWS_2012R2 = '6.3'

VERSION_WINDOWS_2016

public mixed VERSION_WINDOWS_2016 = '10.0'

VERSION_WINDOWS_2019

public mixed VERSION_WINDOWS_2019 = '10.0.1809'

VIRT_PARALLELS_SERVER

public mixed VIRT_PARALLELS_SERVER = 'parallels-server'

Methods

getHWID()

Get product HWID

public static getHWID() : string
Tags
since
18.0.23
Return values
string

getHyperscalerIpMapping()

Returns mapping of private IP addresses to public IP addresses as stated in instance metadata

public static getHyperscalerIpMapping() : array<string|int, mixed>
Tags
since
18.0.39
Return values
array<string|int, mixed>

getHyperscalerName()

Returns the name of the hyperscaler ths instance is running on, or null if none was detected

public static getHyperscalerName() : string|null
Tags
since
18.0.39
Return values
string|null

getLastInstalledUpdate()

Retrieve last installed update

public static getLastInstalledUpdate() : string
Return values
string

Update number or empty string

getOsArch()

Retrieve OS architecture

public static getOsArch() : string|null
Tags
since
17.0
Return values
string|null

getOsCodename()

Retrieve OS codename

public static getOsCodename() : string|null
Tags
since
17.0
Return values
string|null

getOsName()

Retrieve OS name

public static getOsName() : string|null
Tags
since
17.0
Return values
string|null

getOsPackageType()

Retrieve OS package type

public static getOsPackageType() : string|null
Tags
since
17.0
Return values
string|null

getOsShortVersion()

Retrieve OS short version

public static getOsShortVersion() : string|null
Tags
since
17.0
see
pm_ProductInfo::getOsVersion

For Windows version constants matching

Return values
string|null

getOsVersion()

Retrieve OS version

public static getOsVersion() : string|null
Tags
since
17.0
Return values
string|null

getPlatform()

Retrieve platform name

public static getPlatform() : string
Return values
string

getPrivateTempDir()

Retrieve absolute path to temp directory.

public static getPrivateTempDir() : string
Tags
since
17.8
Return values
string

getProductRootDir()

Retrieve absolute path to root directory.

public static getProductRootDir() : string
Tags
since
17.8
Return values
string

getVersion()

Retrieve Plesk version

public static getVersion() : string
Tags
throws
pm_Exception
Return values
string

getVirtualization()

Retrieve virtualization type(s)

public static getVirtualization([bool $all = false ]) : array<string|int, mixed>|string
Parameters
$all : bool = false

Set true to get all virtualization types (array)

Tags
since
17.0
Return values
array<string|int, mixed>|string

hasHyperscalerIpMapping()

Returns whether this is an instance of a hyperscaler that uses NAT with public/private addresses mapping

public static hasHyperscalerIpMapping() : bool
Tags
since
18.0.39
Return values
bool

isUnix()

Check if platform is Unix

public static isUnix() : bool
Return values
bool

isWindows()

Check if platform is Windows

public static isWindows() : bool
Return values
bool

Search results