system
in package
Table of Contents
Properties
- $_command : mixed
- $_distrib : mixed
- $_hasExec : mixed
- $_installPackage : mixed
- $_os_version : mixed
Methods
- checkAndInstall() : mixed
- checkHasExec() : mixed
- checkInstallationLog() : string
- fuserk() : void
- get() : mixed
- getArch() : string
- getCmdPython3() : mixed
- getCmdSudo() : string
- getDistrib() : string|object
- getInstallPackage() : mixed
- getOsVersion() : mixed
- installPackage() : mixed
- installPackageInProgress() : bool
- kill() : void
- Kill a process by PID or name.
- launchScriptPackage() : mixed
- loadCommand() : mixed
- os_incompatible() : bool
- php() : mixed
- ps() : array<int, array<string, string>>
- Find processes matching a grep-compatible pattern.
- getPython3VenvDir() : mixed
- splitpackageByPlugin() : mixed
Properties
$_command
private
static mixed
$_command
= array('suse' => array('cmd_check' => ' rpm -qa | grep ', 'cmd_install' => ' zypper in --non-interactive ', 'www-uid' => 'wwwrun', 'www-gid' => 'www', 'type' => 'zypper'), 'sles' => array('cmd_check' => ' rpm -qa | grep ', 'cmd_install' => ' zypper in --non-interactive ', 'www-uid' => 'wwwrun', 'www-gid' => 'www', 'type' => 'zypper'), 'redhat' => array('cmd_check' => ' rpm -qa | grep ', 'cmd_install' => ' yum install ', 'www-uid' => 'www-data', 'www-gid' => 'www-data', 'type' => 'yum'), 'fedora' => array('cmd_check' => ' rpm -qa | grep ', 'cmd_install' => ' dnf install ', 'www-uid' => 'www-data', 'www-gid' => 'www-data', 'type' => 'dnf'), 'debian' => array('cmd_check' => ' dpkg --get-selections | grep -v deinstall | grep ', 'cmd_install' => ' apt-get install -y ', 'www-uid' => 'www-data', 'www-gid' => 'www-data', 'type' => 'apt'))
$_distrib
private
static mixed
$_distrib
= \null
$_hasExec
private
static mixed
$_hasExec
= array()
$_installPackage
private
static mixed
$_installPackage
= array()
$_os_version
private
static mixed
$_os_version
= \null
Methods
checkAndInstall()
public
static checkAndInstall(array<string|int, mixed> $_packages[, bool $_fix = false ][, bool $_foreground = false ][, string $_plugin = '' ][, bool $_force = false ]) : mixed
Parameters
- $_packages : array<string|int, mixed>
- $_fix : bool = false
- $_foreground : bool = false
- $_plugin : string = ''
- $_force : bool = false
checkHasExec()
public
static checkHasExec(string $_exec) : mixed
Parameters
- $_exec : string
checkInstallationLog()
public
static checkInstallationLog([string $_plugin = '' ]) : string
Parameters
- $_plugin : string = ''
Return values
stringfuserk()
public
static fuserk(string $_port[, string $_protocol = 'tcp' ]) : void
Parameters
- $_port : string
- $_protocol : string = 'tcp'
get()
public
static get([string $_key = '' ]) : mixed
Parameters
- $_key : string = ''
getArch()
public
static getArch() : string
Return values
stringgetCmdPython3()
public
static getCmdPython3(string $_plugin) : mixed
Parameters
- $_plugin : string
getCmdSudo()
public
static getCmdSudo() : string
Return values
stringgetDistrib()
public
static getDistrib() : string|object
Return values
string|object —self::
getInstallPackage()
public
static getInstallPackage(string $_type, string $_plugin) : mixed
Parameters
- $_type : string
- $_plugin : string
getOsVersion()
public
static getOsVersion() : mixed
installPackage()
public
static installPackage(string $_type, string $_package[, string $_version = '' ][, string $_plugin = '' ]) : mixed
Parameters
- $_type : string
- $_package : string
- $_version : string = ''
- $_plugin : string = ''
installPackageInProgress()
public
static installPackageInProgress([string $_plugin = '' ]) : bool
Parameters
- $_plugin : string = ''
Return values
boolkill()
Kill a process by PID or name.
public
static kill(int|string $find[, bool $kill9 = true ]) : void
Parameters
- $find : int|string
-
PID or name of the process to kill.
- $kill9 : bool = true
-
Whether to force kill with signal 9.
launchScriptPackage()
public
static launchScriptPackage([string $_plugin = '' ][, bool $_force = false ]) : mixed
Parameters
- $_plugin : string = ''
- $_force : bool = false
loadCommand()
public
static loadCommand() : mixed
os_incompatible()
public
static os_incompatible(string $_type, string $_package, array<string|int, mixed> $_info) : bool
Parameters
- $_type : string
- $_package : string
- $_info : array<string|int, mixed>
Return values
boolphp()
public
static php(string $arguments[, bool $_sudo = false ]) : mixed
Parameters
- $arguments : string
- $_sudo : bool = false
ps()
Find processes matching a grep-compatible pattern.
public
static ps(string $find[, string|int|array<string|int, string|int>|null $without = null ]) : array<int, array<string, string>>
Parameters
- $find : string
-
Pattern used to match process command lines.
- $without : string|int|array<string|int, string|int>|null = null
-
One or more patterns to exclude.
Return values
array<int, array<string, string>> —Matching process details, or an empty array.
getPython3VenvDir()
private
static getPython3VenvDir(string $_plugin) : mixed
Parameters
- $_plugin : string
splitpackageByPlugin()
private
static splitpackageByPlugin(string $_type[, string $_plugin = '' ]) : mixed
Parameters
- $_type : string
- $_plugin : string = ''