. */ /** * Doctrine entity manager static wrapper * * @package GNUsocial * @category DB * * @author Hugo Sales * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ namespace App\Core; use Doctrine\ORM\EntityManager; abstract class DB { private static ?EntityManager $em; public static function setEntityManager($m): void { self::$em = $m; } public static function __call($method, array $args = []) { $em->{$method}(...$args); } }