ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilRuntime Class Reference
+ Collaboration diagram for ilRuntime:

Public Member Functions

 isHHVM ()
 Returns true when the runtime used is HHVM.
 isPHP ()
 Returns true when the runtime used is PHP.
 getVersion ()
 getName ()
 __toString ()
 A string representation of the runtime.
 getReportedErrorLevels ()
 shouldLogErrors ()
 shouldDisplayErrors ()

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.

Static Private Attributes

static $instance = null

Detailed Description

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

Constructor & Destructor Documentation

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 19 of file class.ilRuntime.php.

{}

Member Function Documentation

ilRuntime::__toString ( )

A string representation of the runtime.

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

References getName(), and getVersion().

{
return $this->getName() . ' ' . $this->getVersion();
}

+ Here is the call graph for this function:

static ilRuntime::getInstance ( )
static
Returns
self

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

References $instance.

Referenced by ilApc\getMemoryLimit(), ilErrorHandling\handleRuntimeErrors(), and ilErrorHandling\ilErrorHandling().

{
if(self::$instance === null)
{
self::$instance = new self();
}
}

+ Here is the caller graph for this function:

ilRuntime::getName ( )
Returns
string

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

References isHHVM().

Referenced by __toString().

{
if($this->isHHVM())
{
return 'HHVM';
}
else
{
return 'PHP';
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRuntime::getReportedErrorLevels ( )
Returns
int

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

References isHHVM().

{
if($this->isHHVM())
{
return ini_get('hhvm.log.runtime_error_reporting_level');
}
else
{
return ini_get('error_reporting');
}
}

+ Here is the call graph for this function:

ilRuntime::getVersion ( )
Returns
string

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

References isHHVM().

Referenced by __toString().

{
if($this->isHHVM())
{
return HHVM_VERSION;
}
else
{
return PHP_VERSION;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilRuntime::isHHVM ( )

Returns true when the runtime used is HHVM.

Returns
bool

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

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

{
return defined('HHVM_VERSION');
}

+ Here is the caller graph for this function:

ilRuntime::isPHP ( )

Returns true when the runtime used is PHP.

Returns
bool

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

References isHHVM().

{
return !$this->isHHVM();
}

+ Here is the call graph for this function:

ilRuntime::shouldDisplayErrors ( )
Returns
boolean

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

References isHHVM().

{
if($this->isHHVM())
{
return (bool)ini_get('hhvm.debug.server_error_message');
}
else
{
return (bool)ini_get('display_errors');
}
}

+ Here is the call graph for this function:

ilRuntime::shouldLogErrors ( )
Returns
boolean

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

References isHHVM().

{
if($this->isHHVM())
{
return (bool)ini_get('hhvm.log.use_log_file');
}
else
{
return (bool)ini_get('log_errors');
}
}

+ Here is the call graph for this function:

Field Documentation

ilRuntime::$instance = null
staticprivate

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

Referenced by getInstance().


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