ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ContainerSingleton.php
Go to the documentation of this file.
1<?php
2
3namespace SAML2\Compat;
4
6
8{
12 protected static $container;
13
17 public static function getInstance()
18 {
19 if (!self::$container) {
20 self::setContainer(self::initSspContainer());
21 }
22 return self::$container;
23 }
24
32 {
34 return $container;
35 }
36
40 public static function initSspContainer()
41 {
42 return new Container();
43 }
44}
An exception for terminatinating execution or to throw for unit testing.
static setContainer(AbstractContainer $container)
Set a container to use.
$container
Definition: wac.php:13