1
0
mirror of https://github.com/dg/dibi.git synced 2025-07-31 19:30:30 +02:00

improved phpDoc, capitalized Dibi

This commit is contained in:
David Grudl
2018-05-10 21:45:11 +02:00
parent a6d46c7006
commit a6392db67d
66 changed files with 106 additions and 136 deletions

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Connecting to Databases | dibi</h1> <h1>Connecting to Databases | Dibi</h1>
<?php <?php
@@ -12,7 +12,7 @@ if (@!include __DIR__ . '/../vendor/autoload.php') {
} }
// connects to SQlite using dibi class // connects to SQlite using Dibi class
echo '<p>Connecting to Sqlite: '; echo '<p>Connecting to Sqlite: ';
try { try {
dibi::connect([ dibi::connect([

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Database Reflection | dibi</h1> <h1>Database Reflection | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Dumping SQL and Result Set | dibi</h1> <h1>Dumping SQL and Result Set | Dibi</h1>
<?php <?php

View File

@@ -10,7 +10,7 @@ Tracy\Debugger::enable();
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Fetching Examples | dibi</h1> <h1>Fetching Examples | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Importing SQL Dump from File | dibi</h1> <h1>Importing SQL Dump from File | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Query Language & Conditions | dibi</h1> <h1>Query Language & Conditions | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Query Language Basic Examples | dibi</h1> <h1>Query Language Basic Examples | Dibi</h1>
<?php <?php

View File

@@ -14,7 +14,7 @@ date_default_timezone_set('Europe/Prague');
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Result Set Data Types | dibi</h1> <h1>Result Set Data Types | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Using DateTime | dibi</h1> <h1>Using DateTime | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Using Fluent Syntax | dibi</h1> <h1>Using Fluent Syntax | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Using Limit & Offset | dibi</h1> <h1>Using Limit & Offset | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Using Logger | dibi</h1> <h1>Using Logger | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Using Substitutions | dibi</h1> <h1>Using Substitutions | Dibi</h1>
<?php <?php

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
?> ?>
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Using Transactions | dibi</h1> <h1>Using Transactions | Dibi</h1>
<?php <?php

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Traversable;
/** /**
* dibi connection. * Dibi connection.
* *
* @property-read int $affectedRows * @property-read int $affectedRows
* @property-read int $insertId * @property-read int $insertId
@@ -118,7 +118,7 @@ class Connection implements IConnection
$class = preg_replace(['#\W#', '#sql#'], ['_', 'Sql'], ucfirst(strtolower($this->config['driver']))); $class = preg_replace(['#\W#', '#sql#'], ['_', 'Sql'], ucfirst(strtolower($this->config['driver'])));
$class = "Dibi\\Drivers\\{$class}Driver"; $class = "Dibi\\Drivers\\{$class}Driver";
if (!class_exists($class)) { if (!class_exists($class)) {
throw new Exception("Unable to create instance of dibi driver '$class'."); throw new Exception("Unable to create instance of Dibi driver '$class'.");
} }
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -11,7 +11,7 @@ namespace Dibi;
/** /**
* Default implementation of IDataSource for dibi. * Default implementation of IDataSource.
*/ */
class DataSource implements IDataSource class DataSource implements IDataSource
{ {
@@ -123,9 +123,6 @@ class DataSource implements IDataSource
} }
/**
* Returns the dibi connection.
*/
final public function getConnection(): Connection final public function getConnection(): Connection
{ {
return $this->connection; return $this->connection;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -14,7 +14,7 @@ use Dibi\Helpers;
/** /**
* The dibi driver for Firebird/InterBase database. * The driver for Firebird/InterBase database.
* *
* Driver options: * Driver options:
* - database => the path to database file (server:/path/database.fdb) * - database => the path to database file (server:/path/database.fdb)

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi reflector for Firebird/InterBase database. * The reflector for Firebird/InterBase database.
*/ */
class FirebirdReflector implements Dibi\Reflector class FirebirdReflector implements Dibi\Reflector
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -14,7 +14,7 @@ use Dibi\Helpers;
/** /**
* The dibi driver for Firebird/InterBase result set. * The driver for Firebird/InterBase result set.
*/ */
class FirebirdResult implements Dibi\ResultDriver class FirebirdResult implements Dibi\ResultDriver
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,8 @@ use Dibi;
/** /**
* The dibi reflector for MySQL databases. * The reflector for MySQL databases.
* @internal
*/ */
class MySqlReflector implements Dibi\Reflector class MySqlReflector implements Dibi\Reflector
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi driver for MySQL database via improved extension. * The driver for MySQL database.
* *
* Driver options: * Driver options:
* - host => the MySQL server host name * - host => the MySQL server host name

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi driver for MySQL result set via improved extension. * The driver for MySQL result set.
*/ */
class MySqliResult implements Dibi\ResultDriver class MySqliResult implements Dibi\ResultDriver
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi driver for no result set. * The driver for no result set.
*/ */
class NoDataResult implements Dibi\ResultDriver class NoDataResult implements Dibi\ResultDriver
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi driver interacting with databases via ODBC connections. * The driver interacting with databases via ODBC connections.
* *
* Driver options: * Driver options:
* - dsn => driver specific DSN * - dsn => driver specific DSN

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi reflector for ODBC connections. * The reflector for ODBC connections.
*/ */
class OdbcReflector implements Dibi\Reflector class OdbcReflector implements Dibi\Reflector
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi driver interacting with result set via ODBC connections. * The driver interacting with result set via ODBC connections.
*/ */
class OdbcResult implements Dibi\ResultDriver class OdbcResult implements Dibi\ResultDriver
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi driver for Oracle database. * The driver for Oracle database.
* *
* Driver options: * Driver options:
* - database => the name of the local Oracle instance or the name of the entry in tnsnames.ora * - database => the name of the local Oracle instance or the name of the entry in tnsnames.ora

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi reflector for Oracle database. * The reflector for Oracle database.
*/ */
class OracleReflector implements Dibi\Reflector class OracleReflector implements Dibi\Reflector
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi driver for Oracle result set. * The driver for Oracle result set.
*/ */
class OracleResult implements Dibi\ResultDriver class OracleResult implements Dibi\ResultDriver
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -15,7 +15,7 @@ use PDO;
/** /**
* The dibi driver for PDO. * The driver for PDO.
* *
* Driver options: * Driver options:
* - dsn => driver specific DSN * - dsn => driver specific DSN

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -15,7 +15,7 @@ use PDO;
/** /**
* The dibi driver for PDO result set. * The driver for PDO result set.
*/ */
class PdoResult implements Dibi\ResultDriver class PdoResult implements Dibi\ResultDriver
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -14,7 +14,7 @@ use Dibi\Helpers;
/** /**
* The dibi driver for PostgreSQL database. * The driver for PostgreSQL database.
* *
* Driver options: * Driver options:
* - host, hostaddr, port, dbname, user, password, connect_timeout, options, sslmode, service => see PostgreSQL API * - host, hostaddr, port, dbname, user, password, connect_timeout, options, sslmode, service => see PostgreSQL API

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi reflector for PostgreSQL database. * The reflector for PostgreSQL database.
*/ */
class PostgreReflector implements Dibi\Reflector class PostgreReflector implements Dibi\Reflector
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -14,7 +14,7 @@ use Dibi\Helpers;
/** /**
* The dibi driver for PostgreSQL result set. * The driver for PostgreSQL result set.
*/ */
class PostgreResult implements Dibi\ResultDriver class PostgreResult implements Dibi\ResultDriver
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -15,7 +15,7 @@ use SQLite3;
/** /**
* The dibi driver for SQLite3 database. * The driver for SQLite3 database.
* *
* Driver options: * Driver options:
* - database (or file) => the filename of the SQLite3 database * - database (or file) => the filename of the SQLite3 database

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -14,7 +14,7 @@ use Dibi\Helpers;
/** /**
* The dibi driver for SQLite3 result set. * The driver for SQLite3 result set.
*/ */
class Sqlite3Result implements Dibi\ResultDriver class Sqlite3Result implements Dibi\ResultDriver
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi reflector for SQLite database. * The reflector for SQLite database.
*/ */
class SqliteReflector implements Dibi\Reflector class SqliteReflector implements Dibi\Reflector
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -14,7 +14,7 @@ use Dibi\Helpers;
/** /**
* The dibi driver for Microsoft SQL Server and SQL Azure databases. * The driver for Microsoft SQL Server and SQL Azure databases.
* *
* Driver options: * Driver options:
* - host => the MS SQL server host name. It can also include a port number (hostname:port) * - host => the MS SQL server host name. It can also include a port number (hostname:port)

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi reflector for Microsoft SQL Server and SQL Azure databases. * The reflector for Microsoft SQL Server and SQL Azure databases.
*/ */
class SqlsrvReflector implements Dibi\Reflector class SqlsrvReflector implements Dibi\Reflector
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* The dibi driver for Microsoft SQL Server and SQL Azure result set. * The driver for Microsoft SQL Server and SQL Azure result set.
*/ */
class SqlsrvResult implements Dibi\ResultDriver class SqlsrvResult implements Dibi\ResultDriver
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -11,7 +11,7 @@ namespace Dibi;
/** /**
* dibi SQL builder via fluent interfaces. * SQL builder via fluent interfaces.
* *
* @method Fluent select(...$field) * @method Fluent select(...$field)
* @method Fluent distinct() * @method Fluent distinct()
@@ -257,9 +257,6 @@ class Fluent implements IDataSource
} }
/**
* Returns the dibi connection.
*/
final public function getConnection(): Connection final public function getConnection(): Connection
{ {
return $this->connection; return $this->connection;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -41,7 +41,6 @@ abstract class HashMapBase
/** /**
* Lazy cached storage. * Lazy cached storage.
*
* @internal * @internal
*/ */
final class HashMap extends HashMapBase final class HashMap extends HashMapBase

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -13,7 +13,7 @@ use Dibi;
/** /**
* dibi file logger. * Dibi file logger.
*/ */
class FileLogger class FileLogger
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -11,20 +11,7 @@ namespace Dibi;
/** /**
* dibi result set. * Query result.
*
* <code>
* $result = dibi::query('SELECT * FROM [table]');
*
* $row = $result->fetch();
* $value = $result->fetchSingle();
* $table = $result->fetchAll();
* $pairs = $result->fetchPairs();
* $assoc = $result->fetchAssoc('col1');
* $assoc = $result->fetchAssoc('col1[]col2->col3');
*
* unset($result);
* </code>
* *
* @property-read int $rowCount * @property-read int $rowCount
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -12,15 +12,6 @@ namespace Dibi;
/** /**
* External result set iterator. * External result set iterator.
*
* This can be returned by Result::getIterator() method or using foreach
* <code>
* $result = dibi::query('SELECT * FROM table');
* foreach ($result as $row) {
* print_r($row);
* }
* unset($result);
* </code>
*/ */
class ResultIterator implements \Iterator, \Countable class ResultIterator implements \Iterator, \Countable
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -11,7 +11,7 @@ namespace Dibi;
/** /**
* dibi SQL translator. * SQL translator.
*/ */
final class Translator final class Translator
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -9,8 +9,7 @@ declare(strict_types=1);
/** /**
* This class is static container class for creating DB objects and * Static container class for Dibi connections.
* store connections info.
* *
* @method void disconnect() * @method void disconnect()
* @method Dibi\Result query(...$args) * @method Dibi\Result query(...$args)

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -11,7 +11,7 @@ namespace Dibi;
/** /**
* dibi common exception. * Dibi common exception.
*/ */
class Exception extends \Exception class Exception extends \Exception
{ {
@@ -20,7 +20,6 @@ class Exception extends \Exception
/** /**
* Construct a dibi exception.
* @param int|string $code * @param int|string $code
*/ */
public function __construct(string $message = '', $code = 0, string $sql = null, \Throwable $previous = null) public function __construct(string $message = '', $code = 0, string $sql = null, \Throwable $previous = null)

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* This file is part of the "dibi" - smart database abstraction layer. * This file is part of the Dibi, smart database abstraction layer (https://dibiphp.com)
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) * Copyright (c) 2005 David Grudl (https://davidgrudl.com)
*/ */
@@ -21,7 +21,7 @@ interface IDataSource extends \Countable, \IteratorAggregate
/** /**
* dibi driver interface. * Driver interface.
*/ */
interface Driver interface Driver
{ {
@@ -110,7 +110,7 @@ interface Driver
/** /**
* dibi result set driver interface. * Result set driver interface.
*/ */
interface ResultDriver interface ResultDriver
{ {
@@ -158,7 +158,7 @@ interface ResultDriver
/** /**
* dibi driver reflection. * Reflection driver.
*/ */
interface Reflector interface Reflector
{ {
@@ -188,7 +188,7 @@ interface Reflector
/** /**
* dibi connection. * Dibi connection.
*/ */
interface IConnection interface IConnection
{ {

View File

@@ -14,7 +14,7 @@ require __DIR__ . '/bootstrap.php';
$conn = new Dibi\Connection($config + ['formatDateTime' => "'Y-m-d H:i:s.u'", 'formatDate' => "'Y-m-d'"]); $conn = new Dibi\Connection($config + ['formatDateTime' => "'Y-m-d H:i:s.u'", 'formatDate' => "'Y-m-d'"]);
// dibi detects INSERT or REPLACE command & booleans // Dibi detects INSERT or REPLACE command & booleans
Assert::same( Assert::same(
reformat("REPLACE INTO [products] ([title], [price]) VALUES ('Drticka', 318)"), reformat("REPLACE INTO [products] ([title], [price]) VALUES ('Drticka', 318)"),
$conn->translate('REPLACE INTO [products]', [ $conn->translate('REPLACE INTO [products]', [
@@ -48,7 +48,7 @@ Assert::same(
); );
// dibi detects UPDATE command // Dibi detects UPDATE command
Assert::same( Assert::same(
reformat("UPDATE [colors] SET [color]='blue', [order]=12 WHERE [id]=123"), reformat("UPDATE [colors] SET [color]='blue', [order]=12 WHERE [id]=123"),
$conn->translate('UPDATE [colors] SET', [ $conn->translate('UPDATE [colors] SET', [