Skip to content

Commit 70f748a

Browse files
committed
Added /src/PhpImap/__autoload.php (alternative to Composer autoloader)
Closes $81
1 parent e7e65de commit 70f748a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/PhpImap/__autoload.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php namespace PhpImap;
2+
3+
spl_autoload_register(function ($class) {
4+
if(strpos($class, __NAMESPACE__) === 0) {
5+
/** @noinspection PhpIncludeInspection */
6+
require_once(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php');
7+
}
8+
});

0 commit comments

Comments
 (0)