lib/ezdb/classes/ezdb.php
File containing the eZDB class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Package
- lib
- Version
- 4.6.0
\eZDB
Package: lib
Parameters
Returns
Parameters
Throws
Details
File containing the eZDB class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Version
- 4.6.0
Constants
Properties
Methods


instance(
string | false $databaseImplementation
=
false, array | false $databaseParameters
=
false, bool $forceNewInstance
=
false
)
:
\eZDBInterface
static
Returns a shared instance of the eZDBInterface class aka database object.
If you want to change the current database values you should use $forceNewInstance.
Name | Type | Description |
---|---|---|
$databaseImplementation | string | false | |
$databaseParameters | array | false | If array, then key 'use_defaults' (bool) is used. |
$forceNewInstance | bool |
Type | Description |
---|---|
\eZDBInterface |


setErrorHandling(
int $errorHandling
)
:
void
static
Sets the default eZDB error handling mode.
Use eZDB::instance()->setErrorHandling() with the same parameters to set error handling for one instance only
Name | Type | Description |
---|---|---|
$errorHandling | int | Possible values are:pm - eZDB::ERROR_HANDLING_STANDARD: backward compatible error handling, using reportError - eZDB::ERROR_HANDLING_EXCEPTION: using exceptions |
Exception | Description |
---|---|
\RuntimeException | thrown when an invalid error handling is given |
- Access
- private
- Since
- 4.5