#jpgraph
#pma
CKEditor_4.6.1
Date
backup
bibelpopup
classes
config
fetch_bibel
fetch_chorbuch
html2pdf-master
html2pdf_v4.03
images
jpgraph
kalender
language
lib
lieder
livesearch
msd
msd2
msd
myoos
phpBB3
tracking
piwik
config
core
API
Access
Application
Archive
ArchiveProcessor
Archiver
AssetManager
Auth
Category
CliMulti
Columns
Composer
Concurrency
Config
Container
ContainerDoesNotExistException.php
ContainerFactory.php
IniConfigDefinitionSource.php
StaticContainer.php
CronArchive
DataAccess
DataFiles
DataTable
Db
Email
Exception
Http
Intl
Mail
Measurable
Menu
Metrics
Notification
Period
Plugin
ProfessionalServices
Report
ReportRenderer
Scheduler
Segment
Session
Settings
Tracker
Translation
UpdateCheck
Updater
Updates
Validators
View
ViewDataTable
Visualization
Widget
Access.php
Archive.php
ArchiveProcessor.php
AssetManager.php
Auth.php
BaseFactory.php
Cache.php
CacheId.php
CliMulti.php
Common.php
Config.php
Console.php
Context.php
Cookie.php
CronArchive.php
DataArray.php
DataTable.php
Date.php
Db.php
DbHelper.php
Development.php
DeviceDetectorCache.php
DeviceDetectorFactory.php
ErrorHandler.php
EventDispatcher.php
ExceptionHandler.php
FileIntegrity.php
Filechecks.php
Filesystem.php
FrontController.php
Http.php
IP.php
Log.php
LogDeleter.php
Mail.php
Metrics.php
MetricsFormatter.php
Nonce.php
Notification.php
NumberFormatter.php
Option.php
Period.php
Piwik.php
Plugin.php
Profiler.php
ProxyHeaders.php
ProxyHttp.php
QuickForm2.php
RankingQuery.php
Registry.php
ReportRenderer.php
ScheduledTask.php
Segment.php
Sequence.php
Session.php
SettingsPiwik.php
SettingsServer.php
Singleton.php
Site.php
TCPDF.php
TaskScheduler.php
Theme.php
Timer.php
Tracker.php
Translate.php
Twig.php
Unzip.php
UpdateCheck.php
Updater.php
Updates.php
Url.php
UrlHelper.php
Version.php
View.php
bootstrap.php
dispatch.php
testMinimumPhpVersion.php
js
lang
libs
misc
plugins
tests
vendor
.htaccess
CHANGELOG.md
CONTRIBUTING.md
LEGALNOTICE
LICENSE
PRIVACY.md
README.md
SECURITY.md
bower.json
composer.json
composer.lock
console
index.php
matomo.js
matomo.php
piwik.js
piwik.php
How to install Matomo.html
wordpress
.gitattributes
.gitignore
README.md
willkommen.txt
overlib
pma
templates
templates_c
validation
++ Umstellung Luther 2017.sql
.gitattributes
.htaccess
Version8_bugs.txt
ajax.js_20170928
ansicht.php
ansicht.php_20200212
ansicht.php_20200915
ansicht.php_lut84_20180219
ansicht2.php
ansicht2.php_20200212
ansicht2.php_20200915
ansicht2.php_lut84_20180219
ausgabe.php
bes_gd.php
bibellookup.php_lut84_20180219
bibellookup_1984.php
bibellookup_2017.php
bibellookup_2017.php_20200212
changelog.php
config.inc.php
copy.js
faq_text.php
faq_text_ber.php
favicon.ico
fetch_data.php
ftp_ansicht.php
ftp_ansicht.php_20181214
func_agent.php
func_ansicht.php
func_ansicht.php_20200212
func_ansicht.php_20200915
func_ansicht.php_lut84_20180219
func_genUser.php
func_highlight.php
func_htmlclean.php
func_make_knk.php
func_make_knk_fa.php
func_make_knk_fa.php_lut84_20180219
func_make_reference_fa.php
func_make_reference_fa.php_lut84_20180219
func_rollenrechte.php
func_rollenrechte_20220202.php
func_write_lue_kat.php
further_publication.php
getSubCat.php
graph.php
graph_einzel.php
graph_hauptframe.php
graph_user.php
graph_user_hauptframe.php
hauptframe.php
hello.cgi
hello.pl
hilfe.php
historie.php
index.php
index2.php
indexframe.php
info.php
job_mail_delete_neue_user.php
job_mail_inaktiv.php
job_user_delete_neue_user.php
job_user_inaktiv.php
jquery.min.js
kat_cont.php
kat_cont.php_20201230
kat_cont.php_20221013
kat_cont_fa.php
kat_main.php
kat_main.php_lut84_20180219
kat_main_fa.php
kat_main_fa.php_lut84_20180219
katechismus.php
katechismus_fa.php
lesung.php
lieder.php
lieder.zip
livesearch.php
livestat.js
livestat.php
livestat2.php
login_log.php
logininfo.php
logout_admin.php
lue_ansicht.php
lue_bearbeiten.php
lue_erfassen.php
lue_inhalt.php
lue_inhalt.php_20200915
lue_inhalt.php_lut84_20180219
lue_notizen.php
lue_suche.php
lue_wahl.php
mail.php
make_ical.php
menuframe.php
nachsenden.php
notizen.php
outlook.php
outlook.php_20200212
outlook_ics.php
outlook_vcs.php
passwort_switch.php
pdf_gen.php
pdf_gen.php_20200915
pdf_gen.php_lut84_20180219
preview.php
profil.php
rollen.php
search_note.php
stichworte.php
suche.php
suche.php_20170928
suche_change.php
suche_simp.php
systemmail.php
test.php
test2.php
testmail.php
testmail2.php
topframe.php
upload.php
user_anlegen.php
user_bearbeiten.php
useronline.php
verweise.php
wort_bearbeiten.php
wort_bearbeiten.php_20170928
wort_erfassen.php
wort_erfassen.php_20170928
wort_exegese.php
wort_wahl.php
88 lines
1.9 KiB
PHP
88 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
* Piwik - free/libre analytics platform
|
|
*
|
|
* @link http://piwik.org
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
|
*/
|
|
|
|
namespace Piwik\Container;
|
|
|
|
use DI\Container;
|
|
|
|
/**
|
|
* This class provides a static access to the container.
|
|
*
|
|
* @deprecated This class is introduced only to keep BC with the current static architecture. It will be removed in 3.0.
|
|
* - it is global state (that class makes the container a global variable)
|
|
* - using the container directly is the "service locator" anti-pattern (which is not dependency injection)
|
|
*/
|
|
class StaticContainer
|
|
{
|
|
/**
|
|
* @var Container[]
|
|
*/
|
|
private static $containerStack = array();
|
|
|
|
/**
|
|
* Definitions to register in the container.
|
|
*
|
|
* @var array[]
|
|
*/
|
|
private static $definitions = array();
|
|
|
|
/**
|
|
* @return Container
|
|
*/
|
|
public static function getContainer()
|
|
{
|
|
if (empty(self::$containerStack)) {
|
|
throw new ContainerDoesNotExistException("The root container has not been created yet.");
|
|
}
|
|
|
|
return end(self::$containerStack);
|
|
}
|
|
|
|
public static function clearContainer()
|
|
{
|
|
self::pop();
|
|
}
|
|
|
|
/**
|
|
* Only use this in tests.
|
|
*
|
|
* @param Container $container
|
|
*/
|
|
public static function push(Container $container)
|
|
{
|
|
self::$containerStack[] = $container;
|
|
}
|
|
|
|
public static function pop()
|
|
{
|
|
array_pop(self::$containerStack);
|
|
}
|
|
|
|
public static function addDefinitions(array $definitions)
|
|
{
|
|
self::$definitions[] = $definitions;
|
|
}
|
|
|
|
/**
|
|
* Proxy to Container::get()
|
|
*
|
|
* @param string $name Container entry name.
|
|
* @return mixed
|
|
* @throws \DI\NotFoundException
|
|
*/
|
|
public static function get($name)
|
|
{
|
|
return self::getContainer()->get($name);
|
|
}
|
|
|
|
public static function getDefinitions()
|
|
{
|
|
return self::$definitions;
|
|
}
|
|
}
|