| 1 |
<?php |
| 2 |
require __DIR__ . '/../src-build/webp-convert.inc'; |
| 3 |
|
| 4 |
spl_autoload_register('webpconvert_disable_autoload', true, true); |
| 5 |
function webpconvert_disable_autoload($class) { |
| 6 |
//echo $class . "\n"; |
| 7 |
if (strpos($class, 'WebPConvert\\') === 0) { |
| 8 |
if (strpos($class, 'WebPConvert\\Tests\\') !== 0) { |
| 9 |
throw new \Exception( |
| 10 |
'Autoloader was about to autoload a WebPConvert class. ' . |
| 11 |
'But that means it was not included in the build! "' . $class . '"'); |
| 12 |
//require_once WEBPEXPRESS_PLUGIN_DIR . '/lib/classes/' . substr($class, 12) . '.php'; |
| 13 |
} |
| 14 |
if (strpos($class, 'ImageMimeTypeGuesser\\') === 0) { |
| 15 |
throw new \Exception( |
| 16 |
'Autoloader was about to autoload a ImageMimeTypeGuesser class. ' . |
| 17 |
'But that means it was not included in the build! "' . $class . '"'); |
| 18 |
} |
| 19 |
} |
| 20 |
} |
| 21 |
|