public static function getDoctrine() { if (empty(self::$_em)) { self::$_em = Registry::get('em'); } return self::$_em; }