// Load the model $model = JModel::getInstance('MyModel', 'MyComponentModel'); // Use the model to retrieve data $data = $model->getData();
// Load the model twice with the same argument $model1 = JModel::getInstance('MyModel', 'MyComponentModel'); $model2 = JModel::getInstance('MyModel', 'MyComponentModel'); // Check if both instances are the same object if ($model1 === $model2) { echo "Both models are the same object."; }The JModel class belongs to the Joomla Platform package library.