lib/ConfigToken/TokenResolver/TokenResolverFactory.php 1 location
|
@@ 34-41 (lines=8) @@
|
| 31 |
|
* |
| 32 |
|
* @throws UnknownTokenResolverTypeException |
| 33 |
|
*/ |
| 34 |
|
public static function get($resolverType) |
| 35 |
|
{ |
| 36 |
|
static::registerKnownTypes(); |
| 37 |
|
if (isset(static::$registeredByType[$resolverType])) { |
| 38 |
|
return new static::$registeredByType[$resolverType]; |
| 39 |
|
} |
| 40 |
|
throw new UnknownTokenResolverTypeException($resolverType); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public static function isRegistered(TokenResolverInterface $tokenResolver) |
| 44 |
|
{ |
lib/ConfigToken/TreeCompiler/XrefResolver/XrefResolverFactory.php 1 location
|
@@ 38-45 (lines=8) @@
|
| 35 |
|
* |
| 36 |
|
* @throws UnknownXrefTypeException |
| 37 |
|
*/ |
| 38 |
|
public static function getByType($xrefType) |
| 39 |
|
{ |
| 40 |
|
static::registerKnownTypes(); |
| 41 |
|
if (isset(static::$registeredByType[$xrefType])) { |
| 42 |
|
return static::$registeredByType[$xrefType]; |
| 43 |
|
} |
| 44 |
|
throw new UnknownXrefTypeException($xrefType); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
/** |
| 48 |
|
* Check if the given resolver is registerd. |