ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
CanCreateDirectoriesInDirectoryCondition.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
5namespace ILIAS\Setup;
6
8{
9 const PROBE_NAME = "probe_for_directory_creation";
10
11 public function __construct($which)
12 {
14 "Can create directories in '$which'",
15 function (Environment $env) use ($which) : bool {
16 $probe = $which . "/" . self::PROBE_NAME;
17 if (!@mkdir($probe, 0774)) {
18 return false;
19 }
20 rmdir($probe);
21 return true;
22 },
23 "ILIAS needs to be able to create directories in '$which'."
24 );
25 }
26}
An exception for terminatinating execution or to throw for unit testing.
A condition that can't be met by ILIAS itself needs to be met by some external means.
An environment holds resources to be used in the setup process.
Definition: Environment.php:12
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc