\JModelLegacy
Base class for a Joomla Model
Acts as a Factory class for application specific objects and
provides many supporting API functions.
Synopsis
class JModelLegacy
extends JObject
{
- // members
- protected $__state_set;
- protected $_db;
- protected $name;
- protected $option;
- protected $state;
- protected $event_clean_cache;
- // Inherited members from JObject
- protected $_errors;
- // methods
- public static array addIncludePath()
- public static void addTablePath()
- protected static string _createFileName()
- public static mixed getInstance()
- public void __construct()
- protected array _getList()
- protected integer _getListCount()
- protected mixed _createTable()
- public JDatabaseDriver getDbo()
- public string getName()
- public getState()
- public JTable getTable()
- public boolean loadHistory()
- protected void populateState()
- public void setDbo()
- public mixed setState()
- protected void cleanCache()
- // Inherited methods from JObject
- public void __construct()
- public string __toString()
- public mixed def()
- public mixed get()
- public array getProperties()
- public string getError()
- public array getErrors()
- public mixed set()
- public boolean setProperties()
- public void setError()
Hierarchy
Extends
Extended by
- StubModelFoobar
- NomodelInName
- RemodelModelRoom
- TestModelLead
- ContactModelCategories
- ContactModelCategory
- ContactModelFeatured
- ContactModelContact
- NewsfeedsModelCategories
- NewsfeedsModelCategory
- NewsfeedsModelNewsfeed
- UsersModelRemind
- UsersModelRegistration
- UsersModelLogin
- UsersModelReset
- UsersModelProfile
- SearchModelSearch
- ContentModelArticle
- ContentModelArchive
- ContentModelCategories
- ContentModelCategory
- ContentModelFeatured
- ContentModelForm
- ContentModelArticles
- FinderModelSuggestions
- FinderModelSearch
- WeblinksModelCategories
- WeblinksModelCategory
- WeblinksModelWeblink
- WeblinksModelForm
- TagsModelTags
- TagsModelTag
- BannersModelBanner
- BannersModelBanners
- ContactModelContacts
- TemplatesModelTemplate
- TemplatesModelStyle
- TemplatesModelTemplates
- TemplatesModelStyles
- NewsfeedsModelNewsfeeds
- CheckinModelCheckin
- PluginsModelPlugin
- PluginsModelPlugins
- RedirectModelLinks
- RedirectModelLink
- CacheModelCache
- UsersModelNote
- UsersModelDebugUser
- UsersModelDebuggroup
- UsersModelGroup
- UsersModelLevels
- UsersModelNotes
- UsersModelMail
- UsersModelUsers
- UsersModelGroups
- UsersModelLevel
- UsersModelUser
- CategoriesModelCategories
- CategoriesModelCategory
- SearchModelSearches
- AdminModelHelp
- AdminModelSysInfo
- AdminModelProfile
- ContentModelFeature
- ContenthistoryModelCompare
- ContenthistoryModelHistory
- ContenthistoryModelPreview
- FinderModelIndexer
- FinderModelIndex
- FinderModelStatistics
- FinderModelFilters
- FinderModelFilter
- FinderModelMaps
- MediaModelManager
- MediaModelList
- WeblinksModelWeblinks
- LanguagesModelInstalled
- LanguagesModelLanguage
- LanguagesModelOverrides
- LanguagesModelOverride
- LanguagesModelLanguages
- LanguagesModelStrings
- InstallerModelUpdate
- InstallerModelDatabase
- InstallerModelDiscover
- InstallerModel
- InstallerModelLanguages
- InstallerModelManage
- InstallerModelWarnings
- InstallerModelInstall
- MessagesModelConfig
- MessagesModelMessages
- MessagesModelMessage
- ModulesModelPositions
- ModulesModelModule
- ModulesModelModules
- ModulesModelSelect
- MenusModelMenus
- MenusModelItems
- MenusModelItem
- MenusModelMenutypes
- MenusModelMenu
- JoomlaupdateModelDefault
- LoginModelLogin
- BannersModelDownload
- BannersModelClient
- BannersModelClients
- BannersModelTracks
- JModelAdmin
- JModelItem
- JModelList
- JModelForm
Members
protected
- $__state_set
—
boolean
Indicates if the internal state has been set - $_db
—
Database Connector - $_errors
—
array
An array of error messages or Exception objects. - $event_clean_cache
—
string
The event to trigger when cleaning cache. - $name
—
string
The model (base) name - $option
—
string
The URL option for the component. - $state
—
string
A state object
Methods
protected
- _createFileName() — Create the filename for a resource
- _createTable() — Method to load and return a model object.
- _getList() — Gets an array of objects from the results of database query.
- _getListCount() — Returns a record count for the query.
- cleanCache() — Clean the cache
- populateState() — Method to auto-populate the model state.
public
- __construct() — Constructor
- addIncludePath() — Add a directory where JModelLegacy 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.
- getDbo() — Method to get the database driver object
- getInstance() — Returns a Model object, always creating it
- getName() — Method to get the model name
- getState() — Method to get model state variables
- getTable() — Method to get a table object, load it if necessary.
- loadHistory() — Method to load a row for editing from the version history table.
- setDbo() — Method to set the database driver object
- setState() — Method to set model state variables
Inherited from JObject
public
- __toString() — Magic method to convert the object to a string gracefully.
- def() — Sets a default value if not alreay assigned
- get() — Returns a property of the object or the default value if the property is not set.
- getError() — Get the most recent error message.
- getErrors() — Return all errors, if any.
- getProperties() — Returns an associative array of object properties.
- set() — Modifies a property of the object, creating it if it does not already exist.
- setError() — Add an error message.
- setProperties() — Set the object properties based on a named array/hash.