Documentation

Menu

## Utilities
in package

Utilities.php : 9

### Table of Contents

#### Methods

getAttributes() : string
  Retrieves the attributes for a given attribute name.
getDataType() : int
  Returns the data type of the given value.
interpolateQuery() : string
  Interpolates the given query string with the provided placeholders.
isSqlAutoCommit() : bool
  test if the SQL query accepts transaction or if it's an auto-commited query https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html

### Methods

#### getAttributes()

Utilities.php : 17

Retrieves the attributes for a given attribute name.

`public static getAttributes(string $attr) : string`

##### Parameters

$attr : string

  The name of the attribute.

##### Return values

string —

The value of the attribute

#### getDataType()

Utilities.php : 49

Returns the data type of the given value.

`public static getDataType(mixed $value) : int`

##### Parameters

$value : mixed

  The value to determine the data type of.

##### Return values

int —

The data type of the value.

#### interpolateQuery()

Utilities.php : 73

Interpolates the given query string with the provided placeholders.

`public static interpolateQuery(string $queryString, array<int|string, mixed> $placeholders) : string`

##### Parameters

$queryString : string

  The query string to be interpolated.

$placeholders : array<int|string, mixed>

  An associative array of placeholders and their corresponding values.

##### Return values

string —

The interpolated query string.

#### isSqlAutoCommit()

Utilities.php : 121

test if the SQL query accepts transaction or if it's an auto-commited query https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html

`public static isSqlAutoCommit(string $sql) : bool`

##### Parameters

$sql : string

##### Return values

bool

## Search results