wang
Well-known member
Hello,
In some places, like cron files for example, I see that the model is calld upon with this method.
In some other places, like controllers, I see that the model is called upon with this method.
When I use the method used in cron in controllers it works, but the other way around it does not work. Can someone explain to me the difference between these 2 methods?
In some places, like cron files for example, I see that the model is calld upon with this method.
PHP:
XenForo_Model::create('XenForo_Model_Thread')->functionName();
In some other places, like controllers, I see that the model is called upon with this method.
PHP:
$threadModel = $this->_getThreadModel();
$threadModel->functionName()
/**
* @return XenForo_Model_Thread
*/
protected function _getThreadModel()
{
return $this->getModelFromCache('XenForo_Model_Thread');
}
When I use the method used in cron in controllers it works, but the other way around it does not work. Can someone explain to me the difference between these 2 methods?