From Joomla! Documentation
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JModel is an abstract class which provides the basic functionality for concrete model objects in conjunction with Joomla's MVC pattern. Models that extend the JModel class are often defined in Joomla components and define the business logic of the specific component. See MVC Development in Joomla
The Joomla MVC Design Pattern
Model-View-Controller (MVC) is a set of design patterns, that are used to separate the different layers of your application.
- The View displays the data of the model by passing it to a template. The view object can therefore access the data of the model. Joomla implements the basic functionality in the abstract JView class.
- The Model stores the data of the application, and contains the business logic. Joomla implements the basic functionality in the abstract JModel class.
- The Controller handles the user requests and evokes the model and the views to change it's state. Joomla implements the basic functionality in the JController class.
|public||getDbo||Method to get the database connector object.|
|public||getName||Method to get the model name.|
|public||getState||Method to get model state variables.|
|public||getTable||Method to get a table object, load it if necessary.|
|public||setDbo||Method to set the database connector object.|
|public||setState||Method to set model state variables.|
|public static||addIncludePath||Add a directory where should search for models.|
|public static||addTablePath||Adds to the stack of model table paths in LIFO order.|
|public static||getInstance||Returns a Model object, always creating it.|
|protected||_getList||Gets an array of objects from the results of database query.|
|protected||_getListCount||Returns a record count for the query.|
|protected||populateState||Method to auto-populate the model state.|
- Defined in libraries/joomla/application/component/model.php
- Extends JObject
- Extended by
jimport( 'joomla.application.component.model' );