From 3660f26e03322be3f4d50b584fbe1ea648f8d3df Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 10 May 2018 21:45:11 +0200 Subject: [PATCH] improved phpDoc, capitalized Dibi --- examples/connecting-to-databases.php | 4 ++-- examples/database-reflection.php | 2 +- examples/dumping-sql-and-result-set.php | 2 +- examples/fetching-examples.php | 2 +- examples/importing-dump-from-file.php | 2 +- examples/query-language-and-conditions.php | 2 +- examples/query-language-basic-examples.php | 2 +- examples/result-set-data-types.php | 2 +- examples/using-datetime.php | 2 +- examples/using-extension-methods.php | 2 +- examples/using-fluent-syntax.php | 2 +- examples/using-limit-and-offset.php | 2 +- examples/using-logger.php | 2 +- examples/using-profiler.php | 2 +- examples/using-substitutions.php | 2 +- examples/using-transactions.php | 2 +- src/Dibi/Bridges/Nette/DibiExtension22.php | 2 +- src/Dibi/Bridges/Tracy/Panel.php | 2 +- src/Dibi/Connection.php | 4 ++-- src/Dibi/DataSource.php | 5 ++--- src/Dibi/DateTime.php | 2 +- src/Dibi/Drivers/FirebirdDriver.php | 5 ++--- src/Dibi/Drivers/MsSqlDriver.php | 4 ++-- src/Dibi/Drivers/MsSqlReflector.php | 4 ++-- src/Dibi/Drivers/MySqlDriver.php | 4 ++-- src/Dibi/Drivers/MySqlReflector.php | 4 ++-- src/Dibi/Drivers/MySqliDriver.php | 5 ++--- src/Dibi/Drivers/OdbcDriver.php | 5 ++--- src/Dibi/Drivers/OracleDriver.php | 5 ++--- src/Dibi/Drivers/PdoDriver.php | 5 ++--- src/Dibi/Drivers/PostgreDriver.php | 5 ++--- src/Dibi/Drivers/Sqlite3Driver.php | 5 ++--- src/Dibi/Drivers/SqliteReflector.php | 4 ++-- src/Dibi/Drivers/SqlsrvDriver.php | 5 ++--- src/Dibi/Drivers/SqlsrvReflector.php | 4 ++-- src/Dibi/Event.php | 2 +- src/Dibi/Expression.php | 2 +- src/Dibi/Fluent.php | 5 ++--- src/Dibi/HashMap.php | 3 +-- src/Dibi/Helpers.php | 2 +- src/Dibi/Literal.php | 2 +- src/Dibi/Loggers/FileLogger.php | 4 ++-- src/Dibi/Loggers/FirePhpLogger.php | 4 ++-- src/Dibi/Reflection/Column.php | 2 +- src/Dibi/Reflection/Database.php | 2 +- src/Dibi/Reflection/ForeignKey.php | 2 +- src/Dibi/Reflection/Index.php | 2 +- src/Dibi/Reflection/Result.php | 2 +- src/Dibi/Reflection/Table.php | 2 +- src/Dibi/Result.php | 17 ++--------------- src/Dibi/ResultIterator.php | 11 +---------- src/Dibi/Row.php | 2 +- src/Dibi/Strict.php | 2 +- src/Dibi/Translator.php | 4 ++-- src/Dibi/Type.php | 2 +- src/Dibi/dibi.php | 5 ++--- src/Dibi/exceptions.php | 5 ++--- src/Dibi/interfaces.php | 8 ++++---- src/loader.php | 2 +- tests/dibi/Translator.phpt | 4 ++-- 60 files changed, 88 insertions(+), 123 deletions(-) diff --git a/examples/connecting-to-databases.php b/examples/connecting-to-databases.php index 5eca6d5f..f4687c42 100644 --- a/examples/connecting-to-databases.php +++ b/examples/connecting-to-databases.php @@ -1,6 +1,6 @@ -

Connecting to Databases | dibi

+

Connecting to Databases | Dibi

Connecting to Sqlite: '; try { dibi::connect([ diff --git a/examples/database-reflection.php b/examples/database-reflection.php index d7116e38..3bfdf7f2 100644 --- a/examples/database-reflection.php +++ b/examples/database-reflection.php @@ -1,6 +1,6 @@ -

Database Reflection | dibi

+

Database Reflection | Dibi

-

Dumping SQL and Result Set | dibi

+

Dumping SQL and Result Set | Dibi

-

Fetching Examples | dibi

+

Fetching Examples | Dibi

-

Importing SQL Dump from File | dibi

+

Importing SQL Dump from File | Dibi

-

Query Language & Conditions | dibi

+

Query Language & Conditions | Dibi

-

Query Language Basic Examples | dibi

+

Query Language Basic Examples | Dibi

-

Result Set Data Types | dibi

+

Result Set Data Types | Dibi

-

Using DateTime | dibi

+

Using DateTime | Dibi

-

Using Extension Methods | dibi

+

Using Extension Methods | Dibi

-

Using Fluent Syntax | dibi

+

Using Fluent Syntax | Dibi

-

Using Limit & Offset | dibi

+

Using Limit & Offset | Dibi

-

Using Logger | dibi

+

Using Logger | Dibi

-

Using Profiler | dibi

+

Using Profiler | Dibi

-

Using Substitutions | dibi

+

Using Substitutions | Dibi

-

Using Transactions | dibi

+

Using Transactions | Dibi

the path to database file (server:/path/database.fdb) @@ -20,7 +20,6 @@ use Dibi; * - 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. * - resource (resource) => existing connection resource - * - lazy, profiler, result, substitutes, ... => see Dibi\Connection options */ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector { diff --git a/src/Dibi/Drivers/MsSqlDriver.php b/src/Dibi/Drivers/MsSqlDriver.php index 67e56da3..960733d2 100644 --- a/src/Dibi/Drivers/MsSqlDriver.php +++ b/src/Dibi/Drivers/MsSqlDriver.php @@ -1,7 +1,7 @@ the MS SQL server host name. It can also include a port number (hostname:port) diff --git a/src/Dibi/Drivers/MsSqlReflector.php b/src/Dibi/Drivers/MsSqlReflector.php index 52c650b3..0707111c 100644 --- a/src/Dibi/Drivers/MsSqlReflector.php +++ b/src/Dibi/Drivers/MsSqlReflector.php @@ -1,7 +1,7 @@ the MySQL server host name diff --git a/src/Dibi/Drivers/MySqlReflector.php b/src/Dibi/Drivers/MySqlReflector.php index ac884571..8bc63a0a 100644 --- a/src/Dibi/Drivers/MySqlReflector.php +++ b/src/Dibi/Drivers/MySqlReflector.php @@ -1,7 +1,7 @@ the MySQL server host name @@ -27,7 +27,6 @@ use Dibi; * - 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 * - resource (mysqli) => existing connection resource - * - lazy, profiler, result, substitutes, ... => see Dibi\Connection options */ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver { diff --git a/src/Dibi/Drivers/OdbcDriver.php b/src/Dibi/Drivers/OdbcDriver.php index bdfdf728..bab379df 100644 --- a/src/Dibi/Drivers/OdbcDriver.php +++ b/src/Dibi/Drivers/OdbcDriver.php @@ -1,7 +1,7 @@ driver specific DSN @@ -19,7 +19,6 @@ use Dibi; * - password (or pass) * - persistent (bool) => try to find a persistent link? * - resource (resource) => existing connection resource - * - lazy, profiler, result, substitutes, ... => see Dibi\Connection options */ class OdbcDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector { diff --git a/src/Dibi/Drivers/OracleDriver.php b/src/Dibi/Drivers/OracleDriver.php index fe2edf74..3cad6e29 100644 --- a/src/Dibi/Drivers/OracleDriver.php +++ b/src/Dibi/Drivers/OracleDriver.php @@ -1,7 +1,7 @@ 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) * - resource (resource) => existing connection resource * - 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 { diff --git a/src/Dibi/Drivers/PdoDriver.php b/src/Dibi/Drivers/PdoDriver.php index 2d1a394e..b8fb3e45 100644 --- a/src/Dibi/Drivers/PdoDriver.php +++ b/src/Dibi/Drivers/PdoDriver.php @@ -1,7 +1,7 @@ driver specific DSN @@ -21,7 +21,6 @@ use PDO; * - options (array) => driver specific options {@see PDO::__construct} * - resource (PDO) => existing connection * - version - * - lazy, profiler, result, substitutes, ... => see Dibi\Connection options */ class PdoDriver implements Dibi\Driver, Dibi\ResultDriver { diff --git a/src/Dibi/Drivers/PostgreDriver.php b/src/Dibi/Drivers/PostgreDriver.php index cad1910c..1d10c301 100644 --- a/src/Dibi/Drivers/PostgreDriver.php +++ b/src/Dibi/Drivers/PostgreDriver.php @@ -1,7 +1,7 @@ see PostgreSQL API @@ -20,7 +20,6 @@ use Dibi; * - charset => character encoding to set (default is utf8) * - persistent (bool) => try to find a persistent link? * - resource (resource) => existing connection resource - * - lazy, profiler, result, substitutes, ... => see Dibi\Connection options */ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector { diff --git a/src/Dibi/Drivers/Sqlite3Driver.php b/src/Dibi/Drivers/Sqlite3Driver.php index 7860a8ff..ac1411de 100644 --- a/src/Dibi/Drivers/Sqlite3Driver.php +++ b/src/Dibi/Drivers/Sqlite3Driver.php @@ -1,7 +1,7 @@ the filename of the SQLite3 database @@ -21,7 +21,6 @@ use SQLite3; * - dbcharset => database character encoding (will be converted to 'charset') * - charset => character encoding to set (default is UTF-8) * - resource (SQLite3) => existing connection resource - * - lazy, profiler, result, substitutes, ... => see Dibi\Connection options */ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver { diff --git a/src/Dibi/Drivers/SqliteReflector.php b/src/Dibi/Drivers/SqliteReflector.php index 4058888c..93431ebf 100644 --- a/src/Dibi/Drivers/SqliteReflector.php +++ b/src/Dibi/Drivers/SqliteReflector.php @@ -1,7 +1,7 @@ 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} * - charset => character encoding to set (default is UTF-8) * - resource (resource) => existing connection resource - * - lazy, profiler, result, substitutes, ... => see Dibi\Connection options */ class SqlsrvDriver implements Dibi\Driver, Dibi\ResultDriver { diff --git a/src/Dibi/Drivers/SqlsrvReflector.php b/src/Dibi/Drivers/SqlsrvReflector.php index 4cdce435..26fc3ac8 100644 --- a/src/Dibi/Drivers/SqlsrvReflector.php +++ b/src/Dibi/Drivers/SqlsrvReflector.php @@ -1,7 +1,7 @@ - * $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); - * + * Query result. * * @property-read int $rowCount */ diff --git a/src/Dibi/ResultIterator.php b/src/Dibi/ResultIterator.php index b137bc8f..36ccf27d 100644 --- a/src/Dibi/ResultIterator.php +++ b/src/Dibi/ResultIterator.php @@ -1,7 +1,7 @@ - * $result = dibi::query('SELECT * FROM table'); - * foreach ($result as $row) { - * print_r($row); - * } - * unset($result); - * */ class ResultIterator implements \Iterator, \Countable { diff --git a/src/Dibi/Row.php b/src/Dibi/Row.php index ad51349b..71caaead 100644 --- a/src/Dibi/Row.php +++ b/src/Dibi/Row.php @@ -1,7 +1,7 @@ "'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( reformat("REPLACE INTO [products] ([title], [price]) VALUES ('Drticka', 318)"), $conn->translate('REPLACE INTO [products]', [ @@ -46,7 +46,7 @@ Assert::same( ); -// dibi detects UPDATE command +// Dibi detects UPDATE command Assert::same( reformat("UPDATE [colors] SET [color]='blue', [order]=12 WHERE [id]=123"), $conn->translate('UPDATE [colors] SET', [