mirror of
https://github.com/typemill/typemill.git
synced 2025-07-31 03:10:19 +02:00
Version 1.1.0 Introducing Plugins, Event-Dispatcher and CookieConsent
This commit is contained in:
@@ -8,16 +8,16 @@ class Plugins
|
||||
{
|
||||
$pluginFolder = $this->scanPluginFolder();
|
||||
$classNames = array();
|
||||
|
||||
|
||||
/* iterate over plugin folders */
|
||||
foreach($pluginFolder as $plugin)
|
||||
{
|
||||
$className = DIRECTORY_SEPARATOR . 'Plugins' . DIRECTORY_SEPARATOR . $plugin . DIRECTORY_SEPARATOR . $plugin;
|
||||
|
||||
$className = '\\Plugins\\' . $plugin . '\\' . $plugin;
|
||||
|
||||
/* if plugin-class and subscribe-method exists, add classname to array */
|
||||
if(class_exists($className) /* && method_exists($className, 'getSubscribedEvents') */)
|
||||
{
|
||||
$classNames[] = $className;
|
||||
$classNames[] = array('className' => $className, 'name' => $plugin);
|
||||
}
|
||||
}
|
||||
return $classNames;
|
||||
|
Reference in New Issue
Block a user