+ public function isLoaded( $name, $constraint = '*' ) {
+ $isLoaded = isset( $this->loaded[$name] );
+ if ( $constraint === '*' || !$isLoaded ) {
+ return $isLoaded;
+ }
+ // if a specific constraint is requested, but no version is set, throw an exception
+ if ( !isset( $this->loaded[$name]['version'] ) ) {
+ $msg = "{$name} does not expose its version, but an extension or a skin"
+ . " requires: {$constraint}.";
+ throw new LogicException( $msg );
+ }
+
+ return SemVer::satisfies( $this->loaded[$name]['version'], $constraint );