From 3e9d9319651e5ce3ff487532b6fe07661531708d Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 5 Jan 2023 00:47:36 +0100 Subject: [PATCH] use ::class for callables --- _prepend.php | 2 +- _public.php | 24 ++++++++++++------------ _widgets.php | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/_prepend.php b/_prepend.php index 42288b3..de2fd12 100644 --- a/_prepend.php +++ b/_prepend.php @@ -18,7 +18,7 @@ dcCore::app()->url->register( 'comListe', 'comListe', '^comListe(?:/(.+))?$', - ['urlcomListe','comListe'] + [urlcomListe::class,'comListe'] ); class urlcomListe extends dcUrlHandlers diff --git a/_public.php b/_public.php index 149751f..9461b9b 100644 --- a/_public.php +++ b/_public.php @@ -20,19 +20,19 @@ if (!dcCore::app()->blog->settings->get(basename(__DIR__))->get('enable')) { require __DIR__ . '/_widgets.php'; -dcCore::app()->tpl->addValue('ComListeURL', ['tplComListe','comListeURL']); -dcCore::app()->tpl->addValue('ComListePageTitle', ['tplComListe','comListePageTitle']); -dcCore::app()->tpl->addValue('ComListeNbComments', ['tplComListe','comListeNbComments']); -dcCore::app()->tpl->addValue('ComListeNbCommentsPerPage', ['tplComListe','comListeNbCommentsPerPage']); -dcCore::app()->tpl->addBlock('ComListeCommentsEntries', ['tplComListe','comListeCommentsEntries']); -dcCore::app()->tpl->addValue('ComListePaginationLinks', ['tplComListe','comListePaginationLinks']); -dcCore::app()->tpl->addValue('ComListeOpenPostTitle', ['tplComListe','comListeOpenPostTitle']); +dcCore::app()->tpl->addValue('ComListeURL', [tplComListe::class,'comListeURL']); +dcCore::app()->tpl->addValue('ComListePageTitle', [tplComListe::class,'comListePageTitle']); +dcCore::app()->tpl->addValue('ComListeNbComments', [tplComListe::class,'comListeNbComments']); +dcCore::app()->tpl->addValue('ComListeNbCommentsPerPage', [tplComListe::class,'comListeNbCommentsPerPage']); +dcCore::app()->tpl->addBlock('ComListeCommentsEntries', [tplComListe::class,'comListeCommentsEntries']); +dcCore::app()->tpl->addValue('ComListePaginationLinks', [tplComListe::class,'comListePaginationLinks']); +dcCore::app()->tpl->addValue('ComListeOpenPostTitle', [tplComListe::class,'comListeOpenPostTitle']); -dcCore::app()->tpl->addBlock('ComListePagination', ['tplComListe','comListePagination']); -dcCore::app()->tpl->addValue('ComListePaginationCounter', ['tplComListe','comListePaginationCounter']); -dcCore::app()->tpl->addValue('ComListePaginationCurrent', ['tplComListe','comListePaginationCurrent']); -dcCore::app()->tpl->addBlock('ComListePaginationIf', ['tplComListe','comListePaginationIf']); -dcCore::app()->tpl->addValue('ComListePaginationURL', ['tplComListe','comListePaginationURL']); +dcCore::app()->tpl->addBlock('ComListePagination', [tplComListe::class,'comListePagination']); +dcCore::app()->tpl->addValue('ComListePaginationCounter', [tplComListe::class,'comListePaginationCounter']); +dcCore::app()->tpl->addValue('ComListePaginationCurrent', [tplComListe::class,'comListePaginationCurrent']); +dcCore::app()->tpl->addBlock('ComListePaginationIf', [tplComListe::class,'comListePaginationIf']); +dcCore::app()->tpl->addValue('ComListePaginationURL', [tplComListe::class,'comListePaginationURL']); dcCore::app()->addBehaviors([ 'publicBreadcrumb' => function ($context, $separator) { diff --git a/_widgets.php b/_widgets.php index 28a2d94..b8edb48 100644 --- a/_widgets.php +++ b/_widgets.php @@ -14,7 +14,7 @@ if (!defined('DC_RC_PATH')) { return null; } -dcCore::app()->addBehavior('initWidgets', ['comListeWidget','initWidget']); +dcCore::app()->addBehavior('initWidgets', [comListeWidget::class,'initWidget']); class comListeWidget {