config
1 year ago
core
1 year ago
js
1 year ago
lang
1 year ago
libs
1 year ago
node_modules
2 years ago
plugins
1 year ago
vendor
1 year ago
.htaccess
6 years ago
DIObject.php
2 years ago
LEGALNOTICE
1 year ago
LICENSE
2 years ago
LegacyAutoloader.php
2 years ago
PRIVACY.md
5 years ago
README.md
1 year ago
SECURITY.md
2 years ago
bootstrap.php
1 year ago
console
6 years ago
favicon.ico
2 years ago
index.php
2 years ago
matomo.js
1 year ago
matomo.php
2 years ago
offline-service-worker.js
5 years ago
piwik.js
1 year ago
piwik.php
2 years ago
robots.txt
5 years ago
DIObject.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Matomo\Dependencies\DI; |
| 4 | |
| 5 | /** |
| 6 | * This file aims to circumvent problems when updating to Matomo 4. |
| 7 | * Matomo 4 includes a newer version of PHP-DI, which does not include \DI\object() any longer |
| 8 | * To not run into any problems with plugins still using that we forward this method to \DI\autowire |
| 9 | */ |
| 10 | if (!function_exists("Matomo\\Dependencies\\DI\\object")) { |
| 11 | function object(...$params) |
| 12 | { |
| 13 | return \Piwik\DI::autowire(...$params); |
| 14 | } |
| 15 | } |
| 16 | if (!function_exists("Matomo\\Dependencies\\DI\\link")) { |
| 17 | function link(...$params) |
| 18 | { |
| 19 | return \Piwik\DI::get(...$params); |
| 20 | } |
| 21 | } |
| 22 |