R
ragtek
Guest
(my english is horrible and i'm not a author, so it's a minimalistic text
Even some Coders are using this, you should NEVER use
to create model instances!
If you do it this way, your model instances won't be using the xenforo plugin system (proxy classes)
which could cause problems
This are the ways how to call a model:
From Controller:
From Model
From all other parts:
Even some Coders are using this, you should NEVER use
PHP:
$foo = new ModelName;
If you do it this way, your model instances won't be using the xenforo plugin system (proxy classes)
which could cause problems
This are the ways how to call a model:
From Controller:
PHP:
$foo = $this->getModelFromCache('ModelName');
From Model
PHP:
$foo = $this->getModelFromCache('ModelName');
From all other parts:
PHP:
$foo = XenForo_Model::create('ModelName');