improve/_prepend.php

48 lines
1,016 B
PHP
Raw Normal View History

2021-09-01 23:35:23 +00:00
<?php
/**
* @brief improve, a plugin for Dotclear 2
*
2021-09-01 23:35:23 +00:00
* @package Dotclear
2021-09-06 21:36:50 +00:00
* @subpackage Plugin
*
2021-09-01 23:35:23 +00:00
* @author Jean-Christian Denis and contributors
*
2021-09-01 23:35:23 +00:00
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
declare(strict_types=1);
namespace plugins\improve;
if (!defined('DC_RC_PATH') || !defined('DC_CONTEXT_ADMIN')) {
2021-09-01 23:35:23 +00:00
return;
}
/**
* Improve prepend class
*
* Manage autoload and some action module helpers.
*/
class prepend
{
public static function process(array &$__autoload): void
{
foreach (['improve', 'action', 'module'] as $class) {
$__autoload['plugins\\improve\\' . $class] = dirname(__FILE__) . '/inc/core/' . $class . '.php';
}
}
public static function getActionsDir(): string
{
return dirname(__FILE__) . '/inc/module/';
}
2021-09-01 23:35:23 +00:00
public static function getActionsNS(): string
{
return 'plugins\\improve\\module\\';
}
}
/* process */
prepend::process($__autoload);