phpDocumentor

MydbCredentials
in package
implements MydbCredentialsInterface

Read onlyYes
Tags
author

Sergei Shilko contact@sshilko.com

license

https://opensource.org/licenses/mit-license.php MIT

see
https://github.com/sshilko/php-sql-mydb

Table of Contents

Interfaces

MydbCredentialsInterface

Properties

$dbname  : string
$flags  : int
$host  : string
$passwd  : string
$port  : int|null
$socket  : string|null
$username  : string

Methods

__construct()  : mixed
Database credentials - hostname Can be either a host name or an IP address. Passing the null value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol.
getDbname()  : string
getFlags()  : int
getHost()  : string
getPasswd()  : string
getPort()  : int|null
getSocket()  : string|null
getUsername()  : string

Properties

Methods

__construct()

Database credentials - hostname Can be either a host name or an IP address. Passing the null value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol.

public __construct(string $host, string $username, string $passwd, string $dbname[, int|null $port = null ][, string|null $socket = null ][, int $flags = 0 ]) : mixed
Parameters
$host : string

hostname or IP address

$username : string

username

$passwd : string

password

$dbname : string

database name

$port : int|null = null

port number

$socket : string|null = null

socket or named pipe

$flags : int = 0

connection flags

Tags
see
https://www.php.net/manual/en/mysqli.real-connect.php

getDbname()

public getDbname() : string
Attributes
#[Override]
Return values
string

getFlags()

public getFlags() : int
Attributes
#[Override]
Return values
int

getHost()

public getHost() : string
Attributes
#[Override]
Return values
string

getPasswd()

public getPasswd() : string
Attributes
#[Override]
Return values
string

getPort()

public getPort() : int|null
Attributes
#[Override]
Return values
int|null

getSocket()

public getSocket() : string|null
Attributes
#[Override]
Return values
string|null

getUsername()

public getUsername() : string
Attributes
#[Override]
Return values
string
On this page

Search results