1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-04 05:07:36 +02:00

improved phpDoc, capitalized Dibi

This commit is contained in:
David Grudl
2018-05-10 21:45:11 +02:00
parent f474abfeda
commit 3660f26e03
60 changed files with 88 additions and 123 deletions

View File

@@ -1,6 +1,6 @@
<!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
@@ -9,7 +9,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

@@ -1,6 +1,6 @@
<!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

@@ -1,6 +1,6 @@
<!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

@@ -9,7 +9,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

@@ -1,6 +1,6 @@
<!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

@@ -1,6 +1,6 @@
<!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

@@ -1,6 +1,6 @@
<!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

@@ -13,7 +13,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

@@ -1,6 +1,6 @@
<!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

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

View File

@@ -1,6 +1,6 @@
<!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

@@ -1,6 +1,6 @@
<!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

@@ -1,6 +1,6 @@
<!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

@@ -2,7 +2,7 @@
<!DOCTYPE html><link rel="stylesheet" href="data/style.css"> <!DOCTYPE html><link rel="stylesheet" href="data/style.css">
<h1>Using Profiler | dibi</h1> <h1>Using Profiler | Dibi</h1>
<?php <?php

View File

@@ -1,6 +1,6 @@
<!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

@@ -1,6 +1,6 @@
<!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)
*/ */
@@ -11,7 +11,7 @@ use Traversable;
/** /**
* dibi connection. * Dibi connection.
* *
* @property-read int $affectedRows * @property-read int $affectedRows
* @property-read int $insertId * @property-read int $insertId

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,7 +9,7 @@ namespace Dibi;
/** /**
* Default implementation of IDataSource for dibi. * Default implementation of IDataSource.
*/ */
class DataSource implements IDataSource class DataSource implements IDataSource
{ {
@@ -131,7 +131,6 @@ class DataSource implements IDataSource
/** /**
* Returns the dibi connection.
* @return Connection * @return Connection
*/ */
final public function getConnection() final public function getConnection()

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 @@ use Dibi;
/** /**
* 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)
@@ -20,7 +20,6 @@ use Dibi;
* - charset => character encoding to set * - charset => character encoding to set
* - buffers (int) => buffers is the number of database buffers to allocate for the server-side cache. If 0 or omitted, server chooses its own default. * - buffers (int) => buffers is the number of database buffers to allocate for the server-side cache. If 0 or omitted, server chooses its own default.
* - resource (resource) => existing connection resource * - resource (resource) => existing connection resource
* - lazy, profiler, result, substitutes, ... => see Dibi\Connection options
*/ */
class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, 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)
*/ */
@@ -11,7 +11,7 @@ use Dibi;
/** /**
* The dibi driver for MS SQL database. * The driver for MS SQL database.
* *
* 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)
*/ */
@@ -11,7 +11,7 @@ use Dibi;
/** /**
* The dibi reflector for MS SQL databases. * The reflector for MS SQL databases.
* @internal * @internal
*/ */
class MsSqlReflector implements Dibi\Reflector class MsSqlReflector 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)
*/ */
@@ -11,7 +11,7 @@ use Dibi;
/** /**
* The dibi driver for MySQL database. * 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)
*/ */
@@ -11,7 +11,7 @@ use Dibi;
/** /**
* The dibi reflector for MySQL databases. * The reflector for MySQL databases.
* @internal * @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)
*/ */
@@ -11,7 +11,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
@@ -27,7 +27,6 @@ use Dibi;
* - unbuffered (bool) => sends query without fetching and buffering the result rows automatically? * - unbuffered (bool) => sends query without fetching and buffering the result rows automatically?
* - sqlmode => see http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html * - sqlmode => see http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
* - resource (mysqli) => existing connection resource * - resource (mysqli) => existing connection resource
* - lazy, profiler, result, substitutes, ... => see Dibi\Connection options
*/ */
class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver class MySqliDriver implements Dibi\Driver, 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)
*/ */
@@ -11,7 +11,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
@@ -19,7 +19,6 @@ use Dibi;
* - password (or pass) * - password (or pass)
* - persistent (bool) => try to find a persistent link? * - persistent (bool) => try to find a persistent link?
* - resource (resource) => existing connection resource * - resource (resource) => existing connection resource
* - lazy, profiler, result, substitutes, ... => see Dibi\Connection options
*/ */
class OdbcDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector class OdbcDriver implements Dibi\Driver, Dibi\ResultDriver, 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)
*/ */
@@ -11,7 +11,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
@@ -22,7 +22,6 @@ use Dibi;
* - nativeDate => use native date format (defaults to false) * - nativeDate => use native date format (defaults to false)
* - resource (resource) => existing connection resource * - resource (resource) => existing connection resource
* - persistent => Creates persistent connections with oci_pconnect instead of oci_new_connect * - persistent => Creates persistent connections with oci_pconnect instead of oci_new_connect
* - lazy, profiler, result, substitutes, ... => see Dibi\Connection options
*/ */
class OracleDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector class OracleDriver implements Dibi\Driver, Dibi\ResultDriver, 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)
*/ */
@@ -12,7 +12,7 @@ use PDO;
/** /**
* The dibi driver for PDO. * The driver for PDO.
* *
* Driver options: * Driver options:
* - dsn => driver specific DSN * - dsn => driver specific DSN
@@ -21,7 +21,6 @@ use PDO;
* - options (array) => driver specific options {@see PDO::__construct} * - options (array) => driver specific options {@see PDO::__construct}
* - resource (PDO) => existing connection * - resource (PDO) => existing connection
* - version * - version
* - lazy, profiler, result, substitutes, ... => see Dibi\Connection options
*/ */
class PdoDriver implements Dibi\Driver, Dibi\ResultDriver class PdoDriver implements Dibi\Driver, 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)
*/ */
@@ -11,7 +11,7 @@ use Dibi;
/** /**
* 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
@@ -20,7 +20,6 @@ use Dibi;
* - charset => character encoding to set (default is utf8) * - charset => character encoding to set (default is utf8)
* - persistent (bool) => try to find a persistent link? * - persistent (bool) => try to find a persistent link?
* - resource (resource) => existing connection resource * - resource (resource) => existing connection resource
* - lazy, profiler, result, substitutes, ... => see Dibi\Connection options
*/ */
class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, 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)
*/ */
@@ -12,7 +12,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
@@ -21,7 +21,6 @@ use SQLite3;
* - dbcharset => database character encoding (will be converted to 'charset') * - dbcharset => database character encoding (will be converted to 'charset')
* - charset => character encoding to set (default is UTF-8) * - charset => character encoding to set (default is UTF-8)
* - resource (SQLite3) => existing connection resource * - resource (SQLite3) => existing connection resource
* - lazy, profiler, result, substitutes, ... => see Dibi\Connection options
*/ */
class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver class Sqlite3Driver implements Dibi\Driver, 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)
*/ */
@@ -11,7 +11,7 @@ use Dibi;
/** /**
* The dibi reflector for SQLite database. * The reflector for SQLite database.
* @internal * @internal
*/ */
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)
*/ */
@@ -12,7 +12,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)
@@ -22,7 +22,6 @@ use Dibi\Helpers;
* - options (array) => connection options {@link https://msdn.microsoft.com/en-us/library/cc296161(SQL.90).aspx} * - options (array) => connection options {@link https://msdn.microsoft.com/en-us/library/cc296161(SQL.90).aspx}
* - charset => character encoding to set (default is UTF-8) * - charset => character encoding to set (default is UTF-8)
* - resource (resource) => existing connection resource * - resource (resource) => existing connection resource
* - lazy, profiler, result, substitutes, ... => see Dibi\Connection options
*/ */
class SqlsrvDriver implements Dibi\Driver, Dibi\ResultDriver class SqlsrvDriver implements Dibi\Driver, 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)
*/ */
@@ -11,7 +11,7 @@ use Dibi;
/** /**
* The dibi reflector for Microsoft SQL Server and SQL Azure databases. * The reflector for Microsoft SQL Server and SQL Azure databases.
* @internal * @internal
*/ */
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)
*/ */

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,7 +9,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()
@@ -272,7 +272,6 @@ class Fluent implements IDataSource
/** /**
* Returns the dibi connection.
* @return Connection * @return Connection
*/ */
final public function getConnection() final public function getConnection()

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)
*/ */
@@ -39,7 +39,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)
*/ */
@@ -11,7 +11,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)
*/ */
@@ -11,7 +11,7 @@ use Dibi;
/** /**
* dibi FirePHP logger. * FirePHP logger.
*/ */
class FirePhpLogger class FirePhpLogger
{ {

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)
*/ */
@@ -9,20 +9,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)
*/ */
@@ -10,15 +10,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)
*/ */
@@ -9,7 +9,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 @@ use Dibi\Type;
/** /**
* This class is static container class for creating DB objects and * Static container class for Dibi connections.
* store connections info.
*/ */
class dibi class dibi
{ {

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,7 +9,7 @@ namespace Dibi;
/** /**
* dibi common exception. * Dibi common exception.
*/ */
class Exception extends \Exception class Exception extends \Exception
{ {
@@ -18,7 +18,6 @@ class Exception extends \Exception
/** /**
* Construct a dibi exception.
* @param string Message describing the exception * @param string Message describing the exception
* @param string|int * @param string|int
* @param string SQL command * @param string SQL command

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)
*/ */
@@ -19,7 +19,7 @@ interface IDataSource extends \Countable, \IteratorAggregate
/** /**
* dibi driver interface. * Driver interface.
*/ */
interface Driver interface Driver
{ {
@@ -151,7 +151,7 @@ interface Driver
/** /**
* dibi result set driver interface. * Result set driver interface.
*/ */
interface ResultDriver interface ResultDriver
{ {
@@ -206,7 +206,7 @@ interface ResultDriver
/** /**
* dibi driver reflection. * Reflection driver.
*/ */
interface Reflector interface 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)
*/ */

View File

@@ -12,7 +12,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]', [
@@ -46,7 +46,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', [