diff --git a/src/FuzeWorks/Core.php b/src/FuzeWorks/Core.php index f9e89ac..a7f7328 100644 --- a/src/FuzeWorks/Core.php +++ b/src/FuzeWorks/Core.php @@ -167,11 +167,6 @@ class Core return $_is_php[$version]; } - public static function isCli(): bool - { - return (PHP_SAPI === 'cli' OR defined('STDIN')); - } - public static function exceptionHandler() { for ($i = Priority::getHighestPriority(); $i <= Priority::getLowestPriority(); $i++) diff --git a/src/FuzeWorks/Libraries.php b/src/FuzeWorks/Libraries.php index 0420808..07ab638 100644 --- a/src/FuzeWorks/Libraries.php +++ b/src/FuzeWorks/Libraries.php @@ -184,7 +184,7 @@ class Libraries protected function initLibrary(string $libraryName, string $libraryClass, array $parameters = []) { // First check to see if the library is already loaded - if (!class_exists($libraryClass, false)) + if (!class_exists($libraryClass, true)) throw new LibraryException("Could not initiate library. Class not found", 1); // Determine what parameters to use diff --git a/src/FuzeWorks/Plugins.php b/src/FuzeWorks/Plugins.php index b65ea05..5516055 100644 --- a/src/FuzeWorks/Plugins.php +++ b/src/FuzeWorks/Plugins.php @@ -37,8 +37,8 @@ namespace FuzeWorks; use FuzeWorks\ConfigORM\ConfigORM; use FuzeWorks\Event\PluginGetEvent; -use FuzeWorks\Exception\ConfigException; use FuzeWorks\Exception\CoreException; +use FuzeWorks\Exception\FactoryException; use FuzeWorks\Exception\PluginException; use ReflectionClass; use ReflectionException; @@ -92,7 +92,7 @@ class Plugins /** * Called upon initialization of the Container * - * @throws ConfigException + * @throws FactoryException * @codeCoverageIgnore */ public function init() @@ -245,7 +245,6 @@ class Plugins $header = $this->headers[$pluginName]; // Add to autoloader - // @todo Find a more reliable method for determining header directory $headerReflection = new ReflectionClass( get_class($header) ); $prefix = $header->getClassesPrefix(); $filePath = dirname($headerReflection->getFileName()) . (!empty($header->getSourceDirectory()) ? DS . $header->getSourceDirectory() : '');