We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70248b7 commit 6445ef3Copy full SHA for 6445ef3
autoload.php
@@ -0,0 +1,23 @@
1
+<?php
2
+declare(strict_types=1);
3
+/*
4
+ * Include this file to use the recipe without composer autoloader (e.g. when running deployer as phar)
5
+ *
6
+ * Implementation based on https://www.php-fig.org/psr/psr-4/examples/
7
+ */
8
+
9
+spl_autoload_register(function ($class) {
10
11
+ $prefix = 'IntegerNet\\DeployerTimer\\';
12
+ $base_dir = __DIR__ . '/src/';
13
14
+ $len = strlen($prefix);
15
+ if (strncmp($prefix, $class, $len) !== 0) {
16
+ return;
17
+ }
18
+ $relative_class = substr($class, $len);
19
+ $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
20
+ if (file_exists($file)) {
21
+ require $file;
22
23
+});
0 commit comments