Huygens Remote Manager
  • Namespace
  • Class
  • Tree
  • Todo

Namespaces

  • hrm
    • job
    • param
      • base
    • setting
      • base
    • shell
    • stats
    • user
      • proxy

Classes

  • DatabaseConnection
  • Fileserver
  • FileserverV2
  • HuygensTemplate
  • HuygensTools
  • Log
  • Mail
  • Nav
  • OmeroConnection
  • QueueManager
  • System
  • Util
  • UtilV2
  • Validator

Functions

  • fileButton

Class System

Commodity class for inspecting the System.

This static class provides several commodity functions to inspect system and configuration parameters and to format their input in various ways.

Namespace: hrm
Package: hrm
Located at System.php

Methods summary

public static string
# getHRMVersionAsString( integer $version = -1 )

Returns the HRM version.

Returns the HRM version.

Parameters

$version

(Optional) Version as integer to be converted to its string counterpart. If not passed, current HRM version is returned.

Returns

string
The HRM version number as string (e.g. 3.3)
public static integer
# getHRMVersionAsInteger( )

Returns the HRM version.

Returns the HRM version.

Returns

integer
The HRM version number as integer.
public static integer
# getLatestHRMVersionFromRemoteAsInteger( )

Returns the latest released HRM version as integer.

Returns the latest released HRM version as integer.

The huygens-rm.org server is queried.

Returns

integer
The latest released HRM version number as integer.
public static string
# getLatestHRMVersionFromRemoteAsString( )

Returns the latest HRM version in its string representation.

The huygens-rm.org server is queried.

Returns

string
The HRM version number as string (e.g. 3.3)
public static boolean
# isThereNewHRMRelease( )

Checks whether there is a new HRM release.

Checks whether there is a new HRM release.

isThereNewHRMRelease() throws an Exception if the version could not be obtained from the remote server.

Returns

boolean

True if a newer HRM release exist, false otherwise; if no version information could be retrieved, an Exception is thrown.

Throws

Exception
If the remove server could not be reached.
public static integer
# getDBLastRevision( )

Returns the DB revision expected by this version of the HRM.

Returns the DB revision expected by this version of the HRM.

Returns

integer
DB_LAST_REVISION expected DB revision (e.g. 14).
public static integer
# getDBCurrentRevision( )

Returns current DB revision from the database.

Returns current DB revision from the database.

Returns

integer
DB revision from the database (e.g. 14).
public static boolean
# isDBUpToDate( )

Checks whether the database is up-to-date.

Checks whether the database is up-to-date.

Returns

boolean
True if the database is up-to-date, false otherwise.
public static
# getHuCoreVersionAsInteger( )

Returns the HuCore version in integer notation

Returns the HuCore version in integer notation

Rreturn

int HuCore version as an integer (e.g. 4010002)
public static string
# getMinHuCoreVersionAsString( )

Returns the minimum acceptable HuCore version in string notation.

Returns the minimum acceptable HuCore version in string notation.

Returns

string
Minimum HuCore version as a string (e.g. 4.1.0-p2).
public static integer
# getMinHuCoreVersionAsInteger( )

Returns the minimum acceptable HuCore version in integer notation.

Returns the minimum acceptable HuCore version in integer notation.

Returns

integer
Minimum HuCore version as an integer (e.g. 4010002)
public static boolean
# isMinHuCoreVersion( )

Checks whether the HuCore version is recent enough.

Checks whether the HuCore version is recent enough.

Returns

boolean

True if HuCore is recent enough to run the HRM, false otherwise.

public static boolean
# setHuCoreVersion( integer $value )

Stores the HuCore version in integer notation into the DB.

Stores the HuCore version in integer notation into the DB.

Parameters

$value
HuCore version in integer notation (e.g. 4010002)

Returns

boolean
true if success, false otherwise.
public static string
# getHucoreVersionAsString( integer $version = -1 )

Returns the hucore version as its string representation.

Returns the hucore version as its string representation.

Parameters

$version

(Optional) Version as integer to be converted to its string counterpart. If not passed, current Hucore version is returned.

Returns

string
The version number as string (e.g. 4.1.0-p2)
public static boolean
# hucoreHasValidLicense( )

Checks whether Huygens Core has a valid license.

Checks whether Huygens Core has a valid license.

Returns

boolean
True if the license is valid, false otherwise.
public static boolean
# hasLicense( string $feature )

Finds out whether a Huygens module is supported by the license.

Finds out whether a Huygens module is supported by the license.

Parameters

$feature

The module to find out about. It can use (SQL) wildcards.

Returns

boolean
True if the module is supported by the license.
public static string
# getHucoreServerType( )

Gets the licensed server type for Huygens Core.

Gets the licensed server type for Huygens Core.

Returns

string
One of desktop, small, medium, large, extreme.
public static String
# getOperatingSystem( )

Returns information about operating system and machine architecture.

Returns information about operating system and machine architecture.

Returns

String
A string with OS and architecture (e.g. GNU/Linux x86-64).
public static string
# getKernelRelease( )

Returns the kernel release number.

Returns the kernel release number.

Returns

string
The kernel release number (e.g. 2.6.35).
public static string
# getApacheVersion( )

Returns a string containing the version of the Apache web server.

Returns a string containing the version of the Apache web server.

Returns

string
Apache version as a string (e.g. 2.2.14).
public static string
# getDatabaseType( )

Returns the database type as reported by ADOdb. To be compatible with the HRM it should be one of 'mysql' or 'postgresql'.

Returns the database type as reported by ADOdb. To be compatible with the HRM it should be one of 'mysql' or 'postgresql'.

Returns

string
Database type (e.g. postgresql).
public static string
# getDatabaseVersion( )

Returns the database version.

Returns the database version.

Returns

string
Database version as a string (e.g. 5.1.44).
public static string
# getPHPVersion( )

Returns the php version (for the Apache PHP module).

Returns the php version (for the Apache PHP module).

Returns

string
PHP version (e.g. 5.31).
public static string
# getMemoryLimit( string $unit = 'M' )

Memory limit as set in php.ini.

Memory limit as set in php.ini.

Parameters

$unit

One of 'B' for bytes, 'M' for Megabytes, or 'G' for Gigabytes. Default is 'M'. Omit the parameter to use the default.

Returns

string
Memory limit in the requested unit.
public static string
# getPostMaxSizeFromIni( string $unit = 'M' )

Max allowed size for an HTTP post as set in php.ini.

Max allowed size for an HTTP post as set in php.ini.

Parameters

$unit

One of 'B' for bytes, 'M' for Megabytes, or 'G' for Gigabytes. Default is 'M'. Omit the parameter to use the default.

Returns

string
Max allowed size for an HTTP post in the requested unit.
public static string
# getPostMaxSizeFromConfig( string $unit = 'M' )

Max allowed size for an HTTP post as set in the HRM configuration files.

Max allowed size for an HTTP post as set in the HRM configuration files.

Parameters

$unit

One of 'B' for bytes, 'M' for Megabytes, or 'G' for Gigabytes. Default is 'M'. Omit the parameter to use the default.

Returns

string
Max allowed size for an HTTP post in the requested unit.
public static string
# getPostMaxSize( string $unit = 'M' )

Max allowed size for an HTTP post currently in use.

Max allowed size for an HTTP post currently in use.

Parameters

$unit

One of 'B' for bytes, 'M' for Megabytes, or 'G' for Gigabytes. Default is 'M'. Omit the parameter to use the default.

Returns

string
Max allowed size for an HTTP post in the requested unit.
public static string
# isDownloadEnabledFromConfig( )

Returns the status of file downloads through HTTP as set in the HRM configuration.

Returns the status of file downloads through HTTP as set in the HRM configuration.

Returns

string
'enabled' if the download is enabled; 'disabled' otherwise.
public static string
# isUploadEnabledFromConfig( )

Returns the status of file uploads through HTTP as set in the HRM configuration.

Returns the status of file uploads through HTTP as set in the HRM configuration.

Returns

string
'enabled' if the upload is enabled; 'disabled' otherwise.
public static string
# isUploadEnabledFromIni( )

Returns the status of file uploads through HTTP as set in php.ini.

Returns the status of file uploads through HTTP as set in php.ini.

Returns

string
'enabled' if the upload is enabled; 'disabled' otherwise.
public static string
# isUploadEnabled( )

Returns the status of file uploads through HTTP as set in php.ini and the HRM configuration.

Returns the status of file uploads through HTTP as set in php.ini and the HRM configuration.

Returns

string
'enabled' if the upload is enabled; 'disabled' otherwise.
public static string
# isUploadMaxFileSizeFromIni( string $unit = 'M' )

Max allowed size for a file upload as set in php.ini

Max allowed size for a file upload as set in php.ini

Parameters

$unit

One of 'B' for bytes, 'M' for Megabytes, or 'G' for Gigabytes. Default is 'M'. Omit the parameter to use the default.

Returns

string
Max allowed size for a file upload in the requested unit.
public static string
# isUploadMaxFileSizeFromConfig( string $unit = 'M' )

Max allowed size for a file upload as set in the HRM configuration files.

Max allowed size for a file upload as set in the HRM configuration files.

Parameters

$unit

One of 'B' for bytes, 'M' for Megabytes, or 'G' for Gigabytes. Default is 'M'. Omit the parameter to use the default.

Returns

string
Max allowed size for a file upload in the requested unit.
public static string
# getUploadMaxFileSize( string $unit = 'M' )

Max allowed size for a file upload currently in use.

Max allowed size for a file upload currently in use.

Parameters

$unit

One of 'B' for bytes, 'M' for Megabytes, or 'G' for Gigabytes. Default is 'M'. Omit the parameter to use the default.

Returns

string
Max allowed size for a file upload in bytes.
public static string
# getMaxExecutionTimeFromIni( )

Max execution time in seconds for scripts as set in php.ini.

Max execution time in seconds for scripts as set in php.ini.

Returns

string
Max execution time in seconds.

Constants summary

integer HRM_VERSION_MAJOR

Current HRM major version. This value has to be set by the developers!

Current HRM major version. This value has to be set by the developers!

# 3
integer HRM_VERSION_MINOR

Current HRM minor version. This value has to be set by the developers!

Current HRM minor version. This value has to be set by the developers!

# 4
integer HRM_VERSION_MAINTENANCE

Current HRM maintenance (patch) version. This value has to be set by the developers!

Current HRM maintenance (patch) version. This value has to be set by the developers!

# 0
integer DB_LAST_REVISION

Database revision needed by current HRM version. This value has to be set by the developers!

Database revision needed by current HRM version. This value has to be set by the developers!

# 15
integer MIN_HUCORE_VERSION_MAJOR

Minimum HuCore (major) version number to be compatible with the HRM. This value has to be set by the developers!

Minimum HuCore (major) version number to be compatible with the HRM. This value has to be set by the developers!

# 14
integer MIN_HUCORE_VERSION_MINOR

Minimum HuCore (minor) version number to be compatible with the HRM. This value has to be set by the developers!

Minimum HuCore (minor) version number to be compatible with the HRM. This value has to be set by the developers!

# 6
integer MIN_HUCORE_VERSION_MAINTENANCE

Minimum HuCore (maintenance) version number to be compatible with the HRM. This value has to be set by the developers!

Minimum HuCore (maintenance) version number to be compatible with the HRM. This value has to be set by the developers!

# 1
integer MIN_HUCORE_VERSION_PATCH

Minimum HuCore (patch) version number to be compatible with the HRM. This value has to be set by the developers!

Minimum HuCore (patch) version number to be compatible with the HRM. This value has to be set by the developers!

# 7
Huygens Remote Manager API documentation generated by ApiGen