Marcel
Active member
Cannot load class using XFCP. Load the class using the correct loader first.
1. XenForo_Autoloader->autoload()
2. spl_autoload_call() in MaB/Arch/Model/Thread.php at line 3
Contents of MaB/Arch/Model/Thread.php
Code:
<?php
class MaB_Arch_Model_Thread extends XFCP_MaB_Arch_Model_Thread
{
public function getArchThreads(array $conditions, array $fetchOptions = array())
{
$whereConditions = $this->prepareArchThreadConditions($conditions, $fetchOptions);
etc etc etc
My listener :
* Listen to Event : load_class_model
* Event Hint : None
* Execute Callback : MaB_Arch_Listener::extendModel
Contents of MaB/Arch/Listener.php
Code:
public static function extendModel($class, array &$extend) {
if ($class == 'XenForo_Model_Thread') {
$extend [] = 'MaB_Arch_Model_Thread';
}
}
}
I'm sure it must be something simple. I have tried adding in an event hint of "XenForo_Model_Thread", and removing the if statement from Listener.php
I've also tried changing the listener to load_class instead of load_class_model?
What am I missing?
(Incase you were wondering, my Model/Thread.php has revised versions of getThreads (getArchThreads) and prepareThreadConditions (prepareArchThreadConditions)).