MediaWiki  1.34.0
ServiceAlreadyDefinedException.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Wikimedia\Services;
4 
5 use Exception;
6 use Psr\Container\ContainerExceptionInterface;
7 use RuntimeException;
8 
37 class ServiceAlreadyDefinedException extends RuntimeException
38  implements ContainerExceptionInterface {
39 
44  public function __construct( $serviceName, Exception $previous = null ) {
45  parent::__construct( "Service already defined: $serviceName", 0, $previous );
46  }
47 
48 }
49 
54 class_alias( ServiceAlreadyDefinedException::class,
55  'MediaWiki\Services\ServiceAlreadyDefinedException' );
Wikimedia\Services\ServiceAlreadyDefinedException
Exception thrown when a service was already defined, but the caller expected it to not exist.
Definition: ServiceAlreadyDefinedException.php:37
Wikimedia\Services
Definition: CannotReplaceActiveServiceException.php:3
Wikimedia\Services\ServiceAlreadyDefinedException\__construct
__construct( $serviceName, Exception $previous=null)
Definition: ServiceAlreadyDefinedException.php:44