API16

JModel: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JModel}} ===Defined in=== librari...
 
Doxiki (talk | contribs)
No edit summary
Line 42: Line 42:
|Adds to the stack of model table paths in LIFO order.
|Adds to the stack of model table paths in LIFO order.
|}
|}
===Importing===
===Importing===
<source lang="php">jimport( 'joomla.application.component.model' );</source>
<source lang="php">jimport( 'joomla.application.component.model' );</source>

Revision as of 09:58, 30 March 2010

[Edit Descripton] Template:Description:JModel

Defined in

libraries/joomla/application/component/model.php

Methods

Method name Description
__construct Constructor
setState Method to set model state variables
getState Method to get model state variables
getDbo Method to get the database connector object
setDbo Method to set the database connector object
getName Method to get the model name
getTable Method to get a table object, load it if necessary.
getInstance Returns a Model object, always creating it
addIncludePath Add a directory where JModel should search for models. You may either pass a string or an array of directories.
addTablePath Adds to the stack of model table paths in LIFO order.

Importing

jimport( 'joomla.application.component.model' );

[Edit See Also] Template:SeeAlso:JModel

Examples

<CodeExamplesForm />