PHP Класс iaDb

Subrion - open source content management system Copyright (C) 2016 Intelliants, LLC This file is part of Subrion. Subrion is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Subrion is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Subrion. If not, see .
Наследование: extends abstractUtil, implements iaInterfaceDbAdapter
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$iaCore
$prefix
$tableOptions

Защищенные свойства (Protected)

Свойство Тип Описание
$_PDO
$_PDOStmt
$_counter
$_lastQuery
$_link
$_queryList
$_table
$_tableList

Открытые методы

Метод Описание
__construct ( )
all ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $start, $limit = null, $tableName = null )
assoc ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $tableName = null, $start, $limit = null )
bind ( &$sql, $values )
cascadeDelete ( $tbl, $where = '' )
convertIds ( $ids, $columnName = 'id', $equal = true )
delete ( $condition, $tableName = null, $values = [] )
describe ( $tableName = null, $addPrefix = true )
exists ( $where, $values = [], $tableName = null )
fetchRow ( $result ) : array | null Fetches one row of data from the result set and returns it as an enumerated array
foundRows ( )
getAffected ( )
getAll ( $sql, $start, $limit )
getAssoc ( $sql, $singleRow = false )
getCount ( )
getEnumValues ( $table, $field )
getError ( ) : string Returns the error text from the last MySQL function
getErrorNumber ( )
getFieldNames ( $result ) : array | boolean Returns an array of objects which contains field definition information or FALSE if no field information is available
getInfo ( $type ) : string Returns a string that represents various information on a connected database
getInsertId ( )
getKeyValue ( $sql )
getLastQuery ( )
getMaxOrder ( $table = null, $condition = null )
getNextId ( $table = null ) Returns the ID using auto increment value for a table
getNumFields ( ) : integer Retrieves the number of fields from a query
getNumFields ( $result ) : integer Retrieves the number of fields from a query
getNumRows ( $resource )
getOne ( $sql )
getPrefix ( )
getQueriesList ( )
getRow ( $sql )
init ( )
insert ( array $values, $rawValues = null, $tableName = null )
keyvalue ( $fields = self::ALL_COLUMNS_SELECTION, $condition = null, $tableName = null, $start, $limit = null )
mysqli_result ( $result, $row, $field )
one ( $field, $condition = '', $tableName = null, $start )
one_bind ( $field, $condition, array $values, $tableName = null, $start )
onefield ( $field = self::ID_COLUMN_SELECTION, $condition = null, $start, $limit = null, $tableName = null )
orderByRand ( $max, $id_name = '`id`', $pieces = 12, $delimiter = 100 )
printf ( $pattern, array $replacements )
query ( $sql )
replace ( array $values, $rawValues = null, $tableName = null )
resetTable ( )
row ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $tableName = null, $start )
row_bind ( $fields, $condition, array $values, $tableName = null, $start )
setTable ( $tableName, $addPrefix = true )
setTimezoneOffset ( $offset )
sql ( string $string = '' ) : string Escapes string using valid connection
truncate ( $table = null )
update ( $values, $condition = null, $rawValues = null, $tableName = null )

Защищенные методы

Метод Описание
_connect ( ) : void Creates connection to database
_get ( string $type, string | array $fields, string $condition = '', integer $start, integer | null $limit = null ) : array | boolean Converts short aliases into MySQL query format
_wrapValues ( array $values, array $rawValues ) : string Internal utility function used to generate SET stmt

Описание методов

__construct() публичный Метод

public __construct ( )

_connect() защищенный Метод

Creates connection to database
protected _connect ( ) : void
Результат void

_get() защищенный Метод

Converts short aliases into MySQL query format
protected _get ( string $type, string | array $fields, string $condition = '', integer $start, integer | null $limit = null ) : array | boolean
$type string selection type
$fields string | array fields to be selected
$condition string condition to be used for the selection
$start integer start position
$limit integer | null number of records to be returned
Результат array | boolean

_wrapValues() защищенный Метод

Internal utility function used to generate SET stmt
protected _wrapValues ( array $values, array $rawValues ) : string
$values array values to be set checking by type
$rawValues array values to be set without processing
Результат string

all() публичный Метод

public all ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $start, $limit = null, $tableName = null )

assoc() публичный Метод

public assoc ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $tableName = null, $start, $limit = null )

bind() публичный Метод

public bind ( &$sql, $values )

cascadeDelete() публичный Метод

public cascadeDelete ( $tbl, $where = '' )

convertIds() публичный статический Метод

public static convertIds ( $ids, $columnName = 'id', $equal = true )

delete() публичный Метод

public delete ( $condition, $tableName = null, $values = [] )

describe() публичный Метод

public describe ( $tableName = null, $addPrefix = true )

exists() публичный Метод

public exists ( $where, $values = [], $tableName = null )

fetchRow() публичный Метод

Fetches one row of data from the result set and returns it as an enumerated array
public fetchRow ( $result ) : array | null
$result query result
Результат array | null

foundRows() публичный Метод

public foundRows ( )

getAffected() публичный Метод

public getAffected ( )

getAll() публичный Метод

public getAll ( $sql, $start, $limit )

getAssoc() публичный Метод

public getAssoc ( $sql, $singleRow = false )

getCount() публичный Метод

public getCount ( )

getEnumValues() публичный Метод

public getEnumValues ( $table, $field )

getError() публичный Метод

Returns the error text from the last MySQL function
public getError ( ) : string
Результат string

getErrorNumber() публичный Метод

public getErrorNumber ( )

getFieldNames() публичный Метод

Returns an array of objects which contains field definition information or FALSE if no field information is available
public getFieldNames ( $result ) : array | boolean
$result query result
Результат array | boolean

getInfo() публичный Метод

Returns a string that represents various information on a connected database
public getInfo ( $type ) : string
$type information type
Результат string

getInsertId() публичный Метод

public getInsertId ( )

getKeyValue() публичный Метод

public getKeyValue ( $sql )

getLastQuery() публичный Метод

public getLastQuery ( )

getMaxOrder() публичный Метод

public getMaxOrder ( $table = null, $condition = null )

getNextId() публичный Метод

Returns the ID using auto increment value for a table
public getNextId ( $table = null )

getNumFields() публичный Метод

Retrieves the number of fields from a query
public getNumFields ( ) : integer
Результат integer

getNumFields() публичный Метод

Retrieves the number of fields from a query
public getNumFields ( $result ) : integer
$result query result
Результат integer

getNumRows() публичный Метод

public getNumRows ( $resource )

getOne() публичный Метод

public getOne ( $sql )

getPrefix() публичный Метод

public getPrefix ( )

getQueriesList() публичный Метод

public getQueriesList ( )

getRow() публичный Метод

public getRow ( $sql )

init() публичный Метод

public init ( )

insert() публичный Метод

public insert ( array $values, $rawValues = null, $tableName = null )
$values array

keyvalue() публичный Метод

public keyvalue ( $fields = self::ALL_COLUMNS_SELECTION, $condition = null, $tableName = null, $start, $limit = null )

mysqli_result() публичный Метод

public mysqli_result ( $result, $row, $field )

one() публичный Метод

public one ( $field, $condition = '', $tableName = null, $start )

one_bind() публичный Метод

public one_bind ( $field, $condition, array $values, $tableName = null, $start )
$values array

onefield() публичный Метод

public onefield ( $field = self::ID_COLUMN_SELECTION, $condition = null, $start, $limit = null, $tableName = null )

orderByRand() публичный Метод

public orderByRand ( $max, $id_name = '`id`', $pieces = 12, $delimiter = 100 )

printf() публичный статический Метод

public static printf ( $pattern, array $replacements )
$replacements array

query() публичный Метод

public query ( $sql )

replace() публичный Метод

public replace ( array $values, $rawValues = null, $tableName = null )
$values array

resetTable() публичный Метод

public resetTable ( )

row() публичный Метод

public row ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $tableName = null, $start )

row_bind() публичный Метод

public row_bind ( $fields, $condition, array $values, $tableName = null, $start )
$values array

setTable() публичный Метод

public setTable ( $tableName, $addPrefix = true )

setTimezoneOffset() публичный Метод

public setTimezoneOffset ( $offset )

sql() публичный Метод

Escapes string using valid connection
public sql ( string $string = '' ) : string
$string string string to be escaped
Результат string

truncate() публичный Метод

public truncate ( $table = null )

update() публичный Метод

public update ( $values, $condition = null, $rawValues = null, $tableName = null )

Описание свойств

$_PDO защищенное свойство

protected $_PDO

$_PDOStmt защищенное свойство

protected $_PDOStmt

$_counter защищенное свойство

protected $_counter

$_lastQuery защищенное свойство

protected $_lastQuery

$_queryList защищенное свойство

protected $_queryList

$_table защищенное свойство

protected $_table

$_tableList защищенное свойство

protected $_tableList

$iaCore публичное свойство

public $iaCore

$prefix публичное свойство

public $prefix

$tableOptions публичное свойство

public $tableOptions