Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

kernelservices.ini [Service_db]

The settings of [Service_db] in kernelservices.ini: Class, Factory, Scope, Tags, Description

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/ini-settings/kernelservices/Service_db.md

On this page

kernelservices.ini [Service_db]

The block [Service_db] of settings/kernelservices.ini, with 5 setting(s).

One block per service, [Service_<id>]. The id is the name code asks for:
expKernelServices::get( '<id>' )

Class the class (or interface) of the service
Factory Class::method to call; without it, "new Class( Arguments )"
Arguments[] @<id> another service, %ini:<file>/<Section>/<Variable>% a
setting, anything else as written (@@ and %% for a leading @
or % in a literal)
Scope worker: one per worker and siteaccess (kept across requests on
Velocity; it must hold nothing of a request)
request: one per request (the default)
prototype: a new one each time
Lazy true (the default): made when first asked for
Tags[] names that collect services for a consumer
(expKernelServices::tagged( '<tag>' ))
Description one line for exp:services:list and exp:services:show
Enabled false switches a service off (an extension can switch off one
of the kernel's)

The ids ini.<name> need no block: expKernelServices::get( 'ini.site' ) is
eZINI::instance( 'site.ini' ). The blocks for ini.site and ini.i18n below
only document them.

Never edit settings/kernelservices.ini itself: an update replaces it. Put the settings you change in an override, which wins over the shipped file:

  • settings/override/kernelservices.ini.append.php for every siteaccess,
  • settings/siteaccess/<siteaccess>/kernelservices.ini.append.php for one siteaccess,
  • extension/<extension>/settings/kernelservices.ini.append.php in an extension (read when the extension is active).

Class

Default: eZDBInterface.

<?php /* #?ini charset="utf-8"?
# settings/override/kernelservices.ini.append.php
[Service_db]
Class=eZDBInterface
*/ ?>

Factory

Default: eZDB::instance.

<?php /* #?ini charset="utf-8"?
# settings/override/kernelservices.ini.append.php
[Service_db]
Factory=eZDB::instance
*/ ?>

Scope

the handle in $GLOBALS['eZDBGlobalInstance'] is per request; the connection
underneath is persistent at driver level where the driver keeps one

Default: request.

<?php /* #?ini charset="utf-8"?
# settings/override/kernelservices.ini.append.php
[Service_db]
Scope=request
*/ ?>

Tags

Default: a list of 1: kernel.core.

<?php /* #?ini charset="utf-8"?
# settings/override/kernelservices.ini.append.php
[Service_db]
# an empty "Tags[]" first replaces the shipped list; without it the items are added
Tags[]
Tags[]=kernel.core
*/ ?>

Description

Default: The database handler of the request (eZDB::instance())..

<?php /* #?ini charset="utf-8"?
# settings/override/kernelservices.ini.append.php
[Service_db]
Description=The database handler of the request (eZDB::instance()).
*/ ?>

Generated by ./console exp:help:examples from settings/kernelservices.ini. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x