⇦ Back to ChangeSet classMethod getInstance
public static \Joomla\CMS\Schema\ChangeSet
getInstance
(mixed $db, mixed $folder = null)
Returns a reference to the ChangeSet object, only creating it if it doesn't already exist.
Parameters
- \Joomla\Database\DatabaseDriver $db The current database object
- string $folder The full path to the folder containing the update queries
Returns
- \Joomla\CMS\Schema\ChangeSet
Since
Method getInstance - Source code
/**
* Returns a reference to the ChangeSet object, only creating it if it doesn't already exist.
*
* @param DatabaseDriver $db The current database object
* @param string $folder The full path to the folder containing the update queries
*
* @return ChangeSet
*
* @since 2.5
*/
public static function getInstance($db, $folder = null)
{
if (!\is_object(static::$instance)) {
static::$instance = new static($db, $folder);
}
return static::$instance;
}