ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
class.ilTestProcessLockFileStorage.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
29 public function __construct(int $contextId)
30 {
32 }
33
42 protected function getPathPrefix(): string
43 {
44 return 'ilTestProcessLocks';
45 }
46
56 protected function getPathPostfix(): string
57 {
58 return 'context';
59 }
60
61 public function create(): void
62 {
63 set_error_handler(function ($severity, $message, $file, $line): void {
64 throw new ErrorException($message, $severity, 0, $file, $line);
65 });
66
67 try {
68 parent::create();
69 restore_error_handler();
70 } catch (Exception $e) {
71 restore_error_handler();
72 }
73
74 if (!$this->getFileSystemService()->has($this->path)) {
75 throw new ErrorException(sprintf('Could not find directory: %s', $this->getPath()));
76 }
77 }
78}
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
has(string $class_name)