diff --git a/src/Drafter/Handlers/ModelHandler.php b/src/Drafter/Handlers/ModelHandler.php index 371381f..78014bf 100644 --- a/src/Drafter/Handlers/ModelHandler.php +++ b/src/Drafter/Handlers/ModelHandler.php @@ -1,6 +1,7 @@ config->ignoredNamespaces as $namespace) + { + if (strpos($class, $namespace) === 0) + { + continue 2; + } + } + // Make sure it's really a model - if (! ($instance instanceof \CodeIgniter\Model)) + if (! is_a($class, Model::class, true)) + { + continue; + } + + // Try to instantiate + try + { + $instance = new $class(); + } + catch (\Exception $e) { continue; }