activityReport/src/Prepend.php

41 lines
817 B
PHP
Raw Normal View History

<?php
2023-10-17 20:47:35 +00:00
declare(strict_types=1);
namespace Dotclear\Plugin\activityReport;
2023-10-17 20:47:35 +00:00
use Dotclear\App;
2023-08-17 14:25:19 +00:00
use Dotclear\Core\Process;
/**
2023-10-17 20:47:35 +00:00
* @brief activityReport prepend class.
* @ingroup activityReport
*
* @author Jean-Christian Denis (author)
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
2023-08-17 14:25:19 +00:00
class Prepend extends Process
{
public static function init(): bool
{
2023-08-17 14:25:19 +00:00
return self::status(My::checkContext(My::PREPEND));
}
public static function process(): bool
{
2023-08-17 14:25:19 +00:00
if (!self::status()) {
return false;
}
// regirster activity feed URL
App::url()->register(
My::id(),
'reports',
'^reports/((atom|rss2)/(.+))$',
UrlHandler::feed(...)
);
return true;
2021-09-03 19:35:13 +00:00
}
2022-11-18 20:24:30 +00:00
}