X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fmain%2Fclasses%2Ffeature%2Fclass_FrameworkFeature.php;h=b72644ab7865dd50b8d7bf8567c81cd93bd0c6db;hp=616b4c3c38d28ee4f299a6fa3d068990ae3e7048;hb=de1f271c2bdb43725f6671ea6588a44cf33bf091;hpb=65f6c4366c9709c9c7c9070d903f1d948be0d5b0 diff --git a/inc/main/classes/feature/class_FrameworkFeature.php b/inc/main/classes/feature/class_FrameworkFeature.php index 616b4c3c..b72644ab 100644 --- a/inc/main/classes/feature/class_FrameworkFeature.php +++ b/inc/main/classes/feature/class_FrameworkFeature.php @@ -4,6 +4,7 @@ namespace CoreFramework\Feature; // Import framework stuff use CoreFramework\Configuration\FrameworkConfiguration; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Object\BaseFrameworkSystem; /** @@ -97,7 +98,7 @@ class FrameworkFeature extends BaseFrameworkSystem { */ public static function isFeatureAvailable ($featureName) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: featureName=%s - CALLED!', __METHOD__, __LINE__, $featureName)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: featureName=%s - CALLED!', __METHOD__, __LINE__, $featureName)); // Is the cache set? if (!isset(self::$enabledFeatures[$featureName]['is_available'])) { @@ -108,7 +109,7 @@ class FrameworkFeature extends BaseFrameworkSystem { // Is the feature enabled? if (!self::isFeatureEnabled($featureName)) { // Then it can't be available - self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: Feature "%s"is not enabled.', __METHOD__, __LINE__, $featureName)); + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: Feature "%s"is not enabled.', __METHOD__, __LINE__, $featureName)); return FALSE; } // END - if @@ -116,7 +117,7 @@ class FrameworkFeature extends BaseFrameworkSystem { $configKey = sprintf('feature_%s_class', $featureName); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: configKey=%s', __METHOD__, __LINE__, $configKey)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: configKey=%s', __METHOD__, __LINE__, $configKey)); // Now try to get the instance try { @@ -127,12 +128,12 @@ class FrameworkFeature extends BaseFrameworkSystem { self::$enabledFeatures[$featureName]['is_available'] = self::$enabledFeatures[$featureName]['instance']->isFeatureAvailable(); } catch (NoClassException $e) { // Feature class not found - self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: Feature "%s"is not available due to missing feature class. Disabling feature ...', __METHOD__, __LINE__, $featureName)); + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: Feature "%s"is not available due to missing feature class. Disabling feature ...', __METHOD__, __LINE__, $featureName)); } } // END - if // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d]: featureName=%s,isAvailable=%d - EXIT!', __METHOD__, __LINE__, $featureName, intval(self::$enabledFeatures[$featureName]['is_available']))); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: featureName=%s,isAvailable=%d - EXIT!', __METHOD__, __LINE__, $featureName, intval(self::$enabledFeatures[$featureName]['is_available']))); // Return "cached" status return self::$enabledFeatures[$featureName]['is_available'];