1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 14:37:49 +00:00
Files
matomo/DIObject.php
Markus Staab a3e05baf29 Use variadics/splat instead of call_user_func_array()/func_get_args() (#20934)
the more explicit for is easier to read and static analysis tooling friendly
2023-06-26 14:24:40 +02:00

28 خطوط
555 B
PHP

<?php
namespace DI;
/**
* This file aims to circumvent problems when updating to Matomo 4.
* Matomo 4 includes a newer version of PHP-DI, which does not include \DI\object() any longer
* To not run into any problems with plugins still using that we forward this method to \DI\autowire
*/
if (!function_exists("\DI\object")) {
function object(...$params)
{
return \Piwik\DI::autowire(...$params);
}
}
if (!function_exists("\DI\link")) {
function link(...$params)
{
return \Piwik\DI::get(...$params);
}
}