Untested, but does this work?

Jeremy

in memoriam 1991-2020
In my uninstall code, I think this is a bit redundant (for a table):
PHP:
$db = XenForo_Application::get('db');

$db->query("DROP TABLE `blah`");

I haven't tested this, but I wrote it this way (I haven't done an uninstall test), but will this work instead:
PHP:
XenForo_Application::get('db')->query("DROP TABLE `blah`");
 
Method chaining doesn't work for everything...

For instance:
Code:
		$settingsModel = new EWRporta_Model_Settings;
		$settings = $settingsModel->getSettings();

This can not be chained into:
Code:
		$settings = new EWRporta_Model_Setting->getSettings();
 
Method chaining doesn't work for everything...

For instance:
Code:
		$settingsModel = new EWRporta_Model_Settings;
		$settings = $settingsModel->getSettings();

This can not be chained into:
Code:
		$settings = new EWRporta_Model_Setting->getSettings();

That's cause EWRporta_Model_Setting isn't a function. get('db') is, so, it can chain.
 
Top Bottom