ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilRuntime Class Reference
+ Inheritance diagram for ilRuntime:
+ Collaboration diagram for ilRuntime:

Public Member Functions

 isHHVM ()
 
 isPHP ()
 
 isFPM ()
 
 getVersion ()
 
 getName ()
 
 __toString ()
 
 getReportedErrorLevels ()
 
 shouldLogErrors ()
 
 shouldDisplayErrors ()
 
 getBinary ()
 

Static Public Member Functions

static getInstance ()
 

Private Member Functions

 __construct ()
 The runtime is a constant state during one request, so please use the public static getInstance() to instantiate the runtime. More...
 

Private Attributes

PhpServerConfiguration $server
 

Static Private Attributes

static self $instance = null
 

Detailed Description

Deprecated:
Use \ILIAS\Environment\Configuration\Server\ServerConfiguration instead

Definition at line 26 of file class.ilRuntime.php.

Constructor & Destructor Documentation

◆ __construct()

ilRuntime::__construct ( )
private

The runtime is a constant state during one request, so please use the public static getInstance() to instantiate the runtime.

Definition at line 34 of file class.ilRuntime.php.

References ILIAS\UI\examples\Progress\Bar\server().

+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilRuntime::__toString ( )

Definition at line 81 of file class.ilRuntime.php.

81 : string
82 {
83 return $this->getName() . ' ' . $this->getVersion();
84 }

References getName(), and getVersion().

+ Here is the call graph for this function:

◆ getBinary()

ilRuntime::getBinary ( )

Definition at line 113 of file class.ilRuntime.php.

113 : string
114 {
115 return $this->server->getPhpBinary();
116 }

References ILIAS\UI\examples\Progress\Bar\server().

+ Here is the call graph for this function:

◆ getInstance()

static ilRuntime::getInstance ( )
static

Definition at line 39 of file class.ilRuntime.php.

39 : self
40 {
41 if (self::$instance === null) {
42 self::$instance = new self();
43 }
44
45 return self::$instance;
46 }
static self $instance

References $instance.

Referenced by ILIAS\FileDelivery\Delivery\detemineDeliveryType(), ilErrorHandling\getRuntime(), RunTimeTest\testBinaryCanBeRetrieved(), RunTimeTest\testGetNameReturnsPhpWhenRunningOnPhp(), and RunTimeTest\testGetVersionReturnsPhpVersionWhenRunningPhp().

+ Here is the caller graph for this function:

◆ getName()

ilRuntime::getName ( )

Definition at line 72 of file class.ilRuntime.php.

72 : string
73 {
74 if ($this->isHHVM()) {
75 return 'HHVM';
76 }
77
78 return 'PHP';
79 }

References isHHVM().

Referenced by __toString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getReportedErrorLevels()

ilRuntime::getReportedErrorLevels ( )

Definition at line 86 of file class.ilRuntime.php.

86 : int
87 {
88 if ($this->isHHVM()) {
89 return (int) ini_get('hhvm.log.runtime_error_reporting_level');
90 }
91
92 return $this->server->getErrorReportingLevel();
93 }

References isHHVM(), and ILIAS\UI\examples\Progress\Bar\server().

+ Here is the call graph for this function:

◆ getVersion()

ilRuntime::getVersion ( )

Definition at line 63 of file class.ilRuntime.php.

63 : string
64 {
65 if ($this->isHHVM()) {
66 return HHVM_VERSION;
67 }
68
69 return $this->server->getPhpVersion();
70 }

References isHHVM(), and ILIAS\UI\examples\Progress\Bar\server().

Referenced by __toString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFPM()

ilRuntime::isFPM ( )

Definition at line 58 of file class.ilRuntime.php.

58 : bool
59 {
60 return $this->server->isFpm();
61 }

References ILIAS\UI\examples\Progress\Bar\server().

+ Here is the call graph for this function:

◆ isHHVM()

ilRuntime::isHHVM ( )

Definition at line 48 of file class.ilRuntime.php.

48 : bool
49 {
50 return defined('HHVM_VERSION');
51 }

Referenced by getName(), getReportedErrorLevels(), getVersion(), isPHP(), shouldDisplayErrors(), and shouldLogErrors().

+ Here is the caller graph for this function:

◆ isPHP()

ilRuntime::isPHP ( )

Definition at line 53 of file class.ilRuntime.php.

53 : bool
54 {
55 return !$this->isHHVM();
56 }

References isHHVM().

+ Here is the call graph for this function:

◆ shouldDisplayErrors()

ilRuntime::shouldDisplayErrors ( )

Definition at line 104 of file class.ilRuntime.php.

104 : bool
105 {
106 if ($this->isHHVM()) {
107 return (bool) ini_get('hhvm.debug.server_error_message');
108 }
109
110 return $this->server->isErrorDisplayEnabled();
111 }

References isHHVM(), and ILIAS\UI\examples\Progress\Bar\server().

+ Here is the call graph for this function:

◆ shouldLogErrors()

ilRuntime::shouldLogErrors ( )

Definition at line 95 of file class.ilRuntime.php.

95 : bool
96 {
97 if ($this->isHHVM()) {
98 return (bool) ini_get('hhvm.log.use_log_file');
99 }
100
101 return $this->server->isErrorLoggingEnabled();
102 }

References isHHVM(), and ILIAS\UI\examples\Progress\Bar\server().

+ Here is the call graph for this function:

Field Documentation

◆ $instance

self ilRuntime::$instance = null
staticprivate

Definition at line 28 of file class.ilRuntime.php.

Referenced by getInstance().

◆ $server

PhpServerConfiguration ilRuntime::$server
private

Definition at line 29 of file class.ilRuntime.php.


The documentation for this class was generated from the following file: