Jelix 1.8.14-pre

DbProfileHelpersTrait

Trait for installer/configurator classes.

Tags
since
1.7

Table of Contents

declareDbProfile()  : bool
declare a new db profile. if the content of the section is not given, it will declare an alias to the default profile.
findDbProfile()  : array<string|int, mixed>
removeDbProfile()  : mixed
remove a db profile.

Methods

declareDbProfile()

declare a new db profile. if the content of the section is not given, it will declare an alias to the default profile.

public declareDbProfile(string $name[, null|array<string|int, mixed>|string $sectionContent = null ][, bool $force = true ]) : bool
Parameters
$name : string

the name of the new section/alias

$sectionContent : null|array<string|int, mixed>|string = null

the content of the new section, or null to create an alias

$force : bool = true

true:erase the existing profile

Tags
Return values
bool

true if the ini file has been changed

findDbProfile()

public findDbProfile( $name) : array<string|int, mixed>
Parameters
$name :
Tags
Return values
array<string|int, mixed>

the first item is the profile content as an array (which may be empty if the profile does not exist), the second item is the real profile name in case $name is an alias.

removeDbProfile()

remove a db profile.

public removeDbProfile(string $name) : mixed
Parameters
$name : string

the name of the section/alias

Tags
Return values
mixed

Search results