Skip to content

Commit

Permalink
ENHANCEMENT: has_extension() should allow injector overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlino committed Mar 19, 2019
1 parent 075716f commit 39a29fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Core/Extensible.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ public static function has_extension($classOrExtension, $requiredExtension = nul
if (!$strict && is_subclass_of($extension, $requiredExtension)) {
return true;
}
if (Injector::inst()->get($extension) instanceof $requiredExtension) {
return true;
}
}

return false;
Expand Down

0 comments on commit 39a29fa

Please sign in to comment.