ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Setup\Condition\PHPVersionCondition Class Reference
+ Inheritance diagram for ILIAS\Setup\Condition\PHPVersionCondition:
+ Collaboration diagram for ILIAS\Setup\Condition\PHPVersionCondition:

Public Member Functions

 __construct (string $min_version, ?string $max_version=null, bool $block_setup=false)
 
- Public Member Functions inherited from ILIAS\Setup\Condition\ExternalConditionObjective
 __construct (string $label, \Closure $condition, ?string $message=null, bool $block_setup=false)
 
 getHash ()
 Get a hash for this objective.The hash of two objectives must be the same, if they are the same objective, with the same config on the same environment, i.e. if the one is achieved the other is achieved as well because they are the same. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 
- Public Member Functions inherited from ILIAS\Setup\Objective
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Setup\Condition\ExternalConditionObjective
string $label
 
Closure $condition
 
string $message
 
bool $block_setup
 

Detailed Description

Definition at line 25 of file PHPVersionCondition.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Setup\Condition\PHPVersionCondition::__construct ( string  $min_version,
?string  $max_version = null,
bool  $block_setup = false 
)

Definition at line 27 of file PHPVersionCondition.php.

References ILIAS\Setup\Condition\ExternalConditionObjective\$block_setup, ILIAS\GlobalScreen\Provider\__construct(), ILIAS_VERSION_NUMERIC, and null.

31  {
33  "PHP version >= $min_version and <= $max_version",
34  static fn (Setup\Environment $env): bool =>
35  version_compare(phpversion(), $min_version, ">=")
36  && ($max_version !== null && version_compare(phpversion(), $max_version, "<="))
37  ,
38  $max_version === null
39  ? "ILIAS " . ILIAS_VERSION_NUMERIC . " requires PHP $min_version - $max_version."
40  : "ILIAS " . ILIAS_VERSION_NUMERIC . " requires PHP $min_version or later.",
42  );
43  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const ILIAS_VERSION_NUMERIC
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

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