• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Untested, but does this work?

Jeremy

Well-known member
#1
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`");
 

Jaxel

Well-known member
#4
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();
 

Jeremy

Well-known member
#5
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.