Implemented last change before release 1.2.0

This commit is contained in:
Abel Hoogeveen 2019-08-21 17:50:06 +02:00
parent 4e8bb7ede3
commit ccbf09aa76
No known key found for this signature in database
GPG Key ID: 96C2234920BF4292
3 changed files with 3 additions and 9 deletions

View File

@ -167,11 +167,6 @@ class Core
return $_is_php[$version]; return $_is_php[$version];
} }
public static function isCli(): bool
{
return (PHP_SAPI === 'cli' OR defined('STDIN'));
}
public static function exceptionHandler() public static function exceptionHandler()
{ {
for ($i = Priority::getHighestPriority(); $i <= Priority::getLowestPriority(); $i++) for ($i = Priority::getHighestPriority(); $i <= Priority::getLowestPriority(); $i++)

View File

@ -184,7 +184,7 @@ class Libraries
protected function initLibrary(string $libraryName, string $libraryClass, array $parameters = []) protected function initLibrary(string $libraryName, string $libraryClass, array $parameters = [])
{ {
// First check to see if the library is already loaded // 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); throw new LibraryException("Could not initiate library. Class not found", 1);
// Determine what parameters to use // Determine what parameters to use

View File

@ -37,8 +37,8 @@
namespace FuzeWorks; namespace FuzeWorks;
use FuzeWorks\ConfigORM\ConfigORM; use FuzeWorks\ConfigORM\ConfigORM;
use FuzeWorks\Event\PluginGetEvent; use FuzeWorks\Event\PluginGetEvent;
use FuzeWorks\Exception\ConfigException;
use FuzeWorks\Exception\CoreException; use FuzeWorks\Exception\CoreException;
use FuzeWorks\Exception\FactoryException;
use FuzeWorks\Exception\PluginException; use FuzeWorks\Exception\PluginException;
use ReflectionClass; use ReflectionClass;
use ReflectionException; use ReflectionException;
@ -92,7 +92,7 @@ class Plugins
/** /**
* Called upon initialization of the Container * Called upon initialization of the Container
* *
* @throws ConfigException * @throws FactoryException
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function init() public function init()
@ -245,7 +245,6 @@ class Plugins
$header = $this->headers[$pluginName]; $header = $this->headers[$pluginName];
// Add to autoloader // Add to autoloader
// @todo Find a more reliable method for determining header directory
$headerReflection = new ReflectionClass( get_class($header) ); $headerReflection = new ReflectionClass( get_class($header) );
$prefix = $header->getClassesPrefix(); $prefix = $header->getClassesPrefix();
$filePath = dirname($headerReflection->getFileName()) . (!empty($header->getSourceDirectory()) ? DS . $header->getSourceDirectory() : ''); $filePath = dirname($headerReflection->getFileName()) . (!empty($header->getSourceDirectory()) ? DS . $header->getSourceDirectory() : '');