- Full name:
\App\Infrastructure\Persistence\NativePdoDatabase - Parent class:
QueryBuilder - This class is marked as final and can't be subclassed
- This class is a Final class
Constants
| Constant | Visibility | Type | Value |
|---|---|---|---|
SCOPE_ALL |
private | 'all' | |
SCOPE_SITE |
private | 'site' | |
SCOPE_GLOBAL |
private | 'global' | |
SCOPE_MS_GLOBAL |
private | 'ms_global' |
Properties
connectionType
sitePrefix
basePrefix
prefix
siteKey
siteTables
globalTables
msGlobalTables
option
plugin
content
contenttype
site
user
site_user
product
elfinder_file
elfinder_trash
event_store
pages
page_translations
settings
uploads
connection
configContainer
Methods
__construct
public __construct(\Qubus\Expressive\Connection $connection, \Qubus\Config\ConfigContainer $configContainer): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$connection |
\Qubus\Expressive\Connection | |
$configContainer |
\Qubus\Config\ConfigContainer |
Throws:
setPrefix
Sets the table prefix for Devflow tables.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$prefix |
?string | Alphanumeric name for the new prefix. |
$setTableNames |
bool | Optional. Whether the table names, e.g. Database::$content, should be updated or not. |
Return Value:
Old prefix or Error on error
Throws:
setSiteKey
Sets site key.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$siteKey |
string | Site id to use. |
Return Value:
Previous site id.
Throws:
getSitePrefix
Gets site prefix.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$siteKey |
string|null | Optional. |
Return Value:
Site prefix.
Throws:
tables
Returns an array of Devflow tables.
public tables(string $scope = \self::SCOPE_ALL, bool $prefix = true, string|null $siteKey = null): string[]
The scope argument can take one of the following:
'all' - return all the 'global' and 'site' tables. 'site' - returns the site level tables. 'global' - returns global tables. 'ms_global' - returns multisite global tables.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$scope |
string | (Optional) Can be all, site, global or ms_global. Default: all. |
$prefix |
bool | (Optional) Whether to include table prefixes. Default: true. |
$siteKey |
string|null | (Optional) The siteKey to prefix. Default: Database::siteKey |
Return Value:
Table names.
Throws:
forSite
Useful when you want $db->forSite('site_2_')->option.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$siteKey |
?string |
Throws:
refreshTableNames
Throws:
resolveSitePrefix
Parameters:
| Parameter | Type | Description |
|---|---|---|
$siteKey |
?string |
Throws:
allTables
Throws:
globalScopedTables
Throws:
assertValidPrefix
Parameters:
| Parameter | Type | Description |
|---|---|---|
$prefix |
string |
Throws: