So, vorher in einem FE Modul:
PHP-Code:
$this->import('ModuleBotDetection');
$test01 = $this->ModuleBotDetection->BD_CheckBotAgent();
In C3 ist mein Namespace nun im FE Modul:
PHP-Code:
namespace BugBuster\BotDetection;
Der Import klappt jetzt nur wenn ich es so schreibe:
PHP-Code:
$this->import('\BotDetection\ModuleBotDetection');
Jetzt habe ich aber kein Zugriff mehr drauf auf die Methode,
PHP-Code:
$test01 = $this->ModuleBotDetection->BD_CheckBotAgent();
geht nicht mehr.
Ich habe das jetz mal so gelöst:
PHP-Code:
$this->import('\BotDetection\ModuleBotDetection','ModuleBotDetection');
Dann gehts wieder.
Ist das so richtig/gewollt? Andere Möglichkeiten?
Nachtrag: Leo hat das ähnlich:
PHP-Code:
$this->import('Database\\Installer', 'Installer');
Müssen hier zwei \ sein?
Lesezeichen