Silla.IO API
  • Namespace
  • Class
  • Tree
  • Todo
  • Download

Namespaces

  • App
    • Controllers
  • CMS
    • Controllers
    • Helpers
    • Models
  • Configurations
    • CI
    • Development
    • Production
    • Staging
  • Core
    • Base
    • CLI
      • Cache
      • DB
    • Helpers
    • Modules
      • Cache
        • Adapters
        • Interfaces
      • Crypt
      • DB
        • Adapters
        • Decorators
          • Interfaces
        • Features
          • Paginator
        • Interfaces
      • Registry
      • Render
        • Adapters
        • Interfaces
      • Router
      • Session
        • Adapters
        • Interfaces
  • None
  • Tasks
    • DB

Classes

  • MySQL
  • MySQLi
  • PdoMySql
  • SQLite

Class MySQLi

Database management driver wrapping mysqli extension.

Core\Modules\DB\Adapters\MySQLi implements Core\Modules\DB\Interfaces\Adapter

Direct known subclasses

Core\Modules\DB\Adapters\MySQL

Namespace: Core\Modules\DB\Adapters
Located at modules/db/adapters/mysqli.php

Methods summary

public
# __construct( string $host, string $database, string $username, string $password )

Init actions.

Init actions.

Parameters

$host
Host of the storage engine.
$database
Name of the database.
$username
Username to access the database.
$password
Password phrase for the user.
public array|boolean
# run( Core\Modules\DB\Query $query )

Run a query.

Run a query.

Parameters

$query
Current query object.

Returns

array|boolean

Implementation of

Core\Modules\DB\Interfaces\Adapter::run()
public array|boolean
# query( string $sql, array $bind_params = array() )

Formats a query.

Formats a query.

Parameters

$sql
SQL string query.
$bind_params
Array of parameter values.

Returns

array|boolean
public boolean
# execute( string $sql, array $bind_params = array() )

Executes a query.

Executes a query.

Parameters

$sql
SQL string query.
$bind_params
Parameter to bind.

Returns

boolean

Implementation of

Core\Modules\DB\Interfaces\Adapter::execute()
public boolean
# setCharset( string $charset = 'utf8' )

Sets connection charset.

Sets connection charset.

Parameters

$charset
Charset type.

Returns

boolean

Implementation of

Core\Modules\DB\Interfaces\Adapter::setCharset()
public array
# getTables( string $schema )

Retrieve all tables.

Retrieve all tables.

Parameters

$schema
Schema definition.

Returns

array

Implementation of

Core\Modules\DB\Interfaces\Adapter::getTables()
public array
# getTableSchema( string $table, string $schema )

Retrieves a table schema.

Retrieves a table schema.

Parameters

$table
Table name.
$schema
Schema definition.

Returns

array

Implementation of

Core\Modules\DB\Interfaces\Adapter::getTableSchema()
public
# storeQueries( string $query, array $params = array() )

Stores a query in the cache.

Stores a query in the cache.

Parameters

$query
Query string.
$params
Query parameters.

Implementation of

Core\Modules\DB\Interfaces\Adapter::storeQueries()
public integer
# getLastInsertId( )

Retrieves last inserted id.

Retrieves last inserted id.

Returns

integer

Implementation of

Core\Modules\DB\Interfaces\Adapter::getLastInsertId()
public string
# escapeString( string $value )

Sanitizes string.

Sanitizes string.

Parameters

$value
Variable to be escaped.

Returns

string
public boolean
# clearTable( string $table )

Purges cache.

Purges cache.

Parameters

$table
Table name.

Returns

boolean

Implementation of

Core\Modules\DB\Interfaces\Adapter::clearTable()
protected string
# buildSql( Core\Modules\DB\Query $query )

Builds a sql query.

Builds a sql query.

Parameters

$query
SQL Query.

Returns

string

Throws

DomainException
DB Adapter does not support the required JOIN type.
private mysqli_stmt|false
# prepare( string $sql, array $bind_params = array() )

Prepares a query for execution.

Prepares a query for execution.

Parameters

$sql
SQL Query.
$bind_params
Parameters.

Returns

mysqli_stmt|false

Throws

InvalidArgumentException
The number of values passed and placeholders mismatch.
LogicException
Error in the prepared statement.
private array
# fetchAll( mysqli_result $resource )

Fetch all rows satisfying the query.

Fetch all rows satisfying the query.

Parameters

$resource
Resource source.

Returns

array
public static array
# getSupportedJoinTypes( )

Retrieves all supported types of SQL JOIN operator.

Retrieves all supported types of SQL JOIN operator.

Returns

array

Implementation of

Core\Modules\DB\Interfaces\Adapter::getSupportedJoinTypes()

Properties summary

public Core\Modules\DB\DbCache $cache

DB Cache instance.

DB Cache instance.

#
protected mysqli $link

MySQLi object. Represents a connection between PHP and a MySQL database.

MySQLi object. Represents a connection between PHP and a MySQL database.

#
Silla.IO API API documentation generated by ApiGen