Back to Joomla project (class list)

Class BaseDatabaseModel - list of methods

Base class for a database aware Joomla Model
Acts as a Factory class for application specific objects and provides many supporting API functions.

Extends

Extends

Direct known subclasses

Package: Joomla\CMS\MVC\Model
Copyright: (C) 2006 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/MVC/Model/BaseDatabaseModel.php
Project: Joomla

Method Summary

public
(mixed $config = array(), \Joomla\CMS\MVC\Factory\MVCFactoryInterface $factory = null)

Constructor
Parameters
  • array $config An array of configuration options (name, state, dbo, table_path, ignore_request).
  • \Joomla\CMS\MVC\Factory\MVCFactoryInterface $factory The factory.
Since
  • 3.0
-
  • \Exception
Show source code of this method: __construct Source Code

protected object[]
(mixed $query, mixed $limitstart = 0, mixed $limit = 0)

Gets an array of objects from the results of database query.
Parameters
  • string $query The query.
  • int $limitstart Offset.
  • int $limit The number of records.
Returns
  • object[] An array of results.
Since
  • 3.0
-
  • \RuntimeException
Show source code of this method: _getList Source Code

protected int
(mixed $query)

Returns a record count for the query.
Parameters
  • \Joomla\Database\DatabaseQuery|string $query The query.
Returns
  • int Number of rows for query.
Since
  • 3.0
Show source code of this method: _getListCount Source Code

protected \Joomla\CMS\Table\Table|bool
(mixed $name, mixed $prefix = 'Table', mixed $config = array())

Method to load and return a table object.
Parameters
  • string $name The name of the view
  • string $prefix The class prefix. Optional.
  • array $config Configuration settings to pass to Table::getInstance
Returns
  • \Joomla\CMS\Table\Table|bool Table object or boolean false if failed
Since
  • 3.0
-
  • \JTable::getInstance()
Show source code of this method: _createTable Source Code

public \Joomla\CMS\Table\Table
(mixed $name = '', mixed $prefix = '', mixed $options = array())

Method to get a table object, load it if necessary.
Parameters
  • string $name The table name. Optional.
  • string $prefix The class prefix. Optional.
  • array $options Configuration array for model. Optional.
Returns
  • \Joomla\CMS\Table\Table A Table object
Since
  • 3.0
-
  • \Exception
Show source code of this method: getTable Source Code

public bool
(mixed $item)

Method to check if the given record is checked out by the current user
Parameters
  • \stdClass $item The record to check
Returns
  • bool
Show source code of this method: isCheckedOut Source Code

protected void
(mixed $group = null)

Clean the cache
Parameters
  • string $group The cache group
Returns
  • void
Since
  • 3.0
Show source code of this method: cleanCache Source Code

protected \Joomla\CMS\Extension\ComponentInterface
(mixed $component)

Boots the component with the given name.
Parameters
  • string $component The component name, eg. com_content.
Returns
  • \Joomla\CMS\Extension\ComponentInterface The service container
Since
  • 4.0.0
Show source code of this method: bootComponent Source Code

protected void
(\Joomla\Event\EventInterface $event)

Dispatches the given event on the internal dispatcher, does a fallback to the global one.
Parameters
  • \Joomla\Event\EventInterface $event The event
Returns
  • void
Since
  • 4.1.0
Show source code of this method: dispatchEvent Source Code

Properties Summary

protected string
$option
The URL option for the component.
Since
  • 3.0
protected string
$event_clean_cache
The event to trigger when cleaning cache.
Since
  • 3.0

Tags Summary

Since
2.5.5