1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-04 13:17:58 +02:00

updated phpDoc

This commit is contained in:
David Grudl
2010-08-03 22:48:44 +02:00
parent 9a4f1e6e36
commit 0d7b9c32c9
18 changed files with 125 additions and 121 deletions

View File

@@ -14,14 +14,14 @@
/** /**
* The dibi driver for Firebird/InterBase database. * The dibi driver for Firebird/InterBase database.
* *
* Connection options: * Driver options:
* - 'database' - the path to database file (server:/path/database.fdb) * - database => the path to database file (server:/path/database.fdb)
* - 'username' (or 'user') * - username (or user)
* - 'password' (or 'pass') * - password (or pass)
* - 'charset' - character encoding to set * - charset => character encoding to set
* - 'buffers' - 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.
* - 'lazy' - if TRUE, connection will be established only when required * - resource (resource) => existing connection resource
* - 'resource' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @author Tomáš Kraina, Roman Sklenář * @author Tomáš Kraina, Roman Sklenář
* @copyright Copyright (c) 2010 * @copyright Copyright (c) 2010

View File

@@ -14,14 +14,14 @@
/** /**
* The dibi driver for MS SQL database. * The dibi driver for MS SQL database.
* *
* Connection 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)
* - 'username' (or 'user') * - username (or user)
* - 'password' (or 'pass') * - password (or pass)
* - 'persistent' - try to find a persistent link? * - database => the database name to select
* - 'database' - the database name to select * - persistent (bool) => try to find a persistent link?
* - 'lazy' - if TRUE, connection will be established only when required * - resource (resource) => existing connection resource
* - 'resource' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -14,15 +14,15 @@
/** /**
* The dibi driver for MS SQL Driver 2005 database. * The dibi driver for MS SQL Driver 2005 database.
* *
* Connection 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)
* - 'username' * - username (or user)
* - 'password' * - password (or pass)
* - 'database' - the database name to select * - database => the database name to select
* - 'options' - connection info array {@link http://msdn.microsoft.com/en-us/library/cc296161(SQL.90).aspx} * - options (array) => connection options {@link http://msdn.microsoft.com/en-us/library/cc296161(SQL.90).aspx}
* - 'lazy' - if TRUE, connection will be established only when required * - charset => character encoding to set (default is UTF-8)
* - 'charset' - character encoding to set (default is UTF-8) * - resource (resource) => existing connection resource
* - 'resource' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -14,20 +14,20 @@
/** /**
* The dibi driver for MySQL database. * The dibi driver for MySQL database.
* *
* Connection options: * Driver options:
* - 'host' - the MySQL server host name * - host => the MySQL server host name
* - 'port' - the port number to attempt to connect to the MySQL server * - port (int) => the port number to attempt to connect to the MySQL server
* - 'socket' - the socket or named pipe * - socket => the socket or named pipe
* - 'username' (or 'user') * - username (or user)
* - 'password' (or 'pass') * - password (or pass)
* - 'persistent' - try to find a persistent link? * - database => the database name to select
* - 'database' - the database name to select * - flags (int) => driver specific constants (MYSQL_CLIENT_*)
* - 'charset' - character encoding to set * - charset => character encoding to set
* - 'unbuffered' - sends query without fetching and buffering the result rows automatically? * - persistent (bool) => try to find a persistent link?
* - 'flags' - driver specific constants (MYSQL_CLIENT_*) * - 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
* - 'lazy' - if TRUE, connection will be established only when required * - resource (resource) => existing connection resource
* - 'resource' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -14,21 +14,21 @@
/** /**
* The dibi driver for MySQL database via improved extension. * The dibi driver for MySQL database via improved extension.
* *
* Connection options: * Driver options:
* - 'host' - the MySQL server host name * - host => the MySQL server host name
* - 'port' - the port number to attempt to connect to the MySQL server * - port (int) => the port number to attempt to connect to the MySQL server
* - 'socket' - the socket or named pipe * - socket => the socket or named pipe
* - 'username' (or 'user') * - username (or user)
* - 'password' (or 'pass') * - password (or pass)
* - 'persistent' - try to find a persistent link? * - database => the database name to select
* - 'database' - the database name to select * - options (array) => array of driver specific constants (MYSQLI_*) and values {@see mysqli_options}
* - 'charset' - character encoding to set * - flags (int) => driver specific constants (MYSQLI_CLIENT_*) {@see mysqli_real_connect}
* - 'unbuffered' - sends query without fetching and buffering the result rows automatically? * - charset => character encoding to set
* - 'flags' - driver specific bit constants (MYSQLI_CLIENT_*) {@see mysqli_real_connect} * - persistent (bool) => try to find a persistent link?
* - 'options' - array of driver specific constants (MYSQLI_*) and values {@see mysqli_options} * - 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
* - 'lazy' - if TRUE, connection will be established only when required * - resource (mysqli) => existing connection resource
* - 'resource' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -14,13 +14,13 @@
/** /**
* The dibi driver interacting with databases via ODBC connections. * The dibi driver interacting with databases via ODBC connections.
* *
* Connection options: * Driver options:
* - 'dsn' - driver specific DSN * - dsn => driver specific DSN
* - 'username' (or 'user') * - username (or user)
* - 'password' (or 'pass') * - password (or pass)
* - 'persistent' - try to find a persistent link? * - persistent (bool) => try to find a persistent link?
* - 'lazy' - if TRUE, connection will be established only when required * - resource (resource) => existing connection resource
* - 'resource' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -14,15 +14,15 @@
/** /**
* The dibi driver for Oracle database. * The dibi driver for Oracle database.
* *
* Connection options: * Driver options:
* - 'database' (or 'db') - 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
* - 'username' (or 'user') * - username (or user)
* - 'password' (or 'pass') * - password (or pass)
* - 'lazy' - if TRUE, connection will be established only when required * - charset => character encoding to set
* - 'formatDate' - how to format date in SQL (@see date) * - formatDate => how to format date in SQL (@see date)
* - 'formatDateTime' - how to format datetime in SQL (@see date) * - formatDateTime => how to format datetime in SQL (@see date)
* - 'charset' - character encoding to set * - resource (resource) => existing connection resource
* - 'resource' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -14,13 +14,13 @@
/** /**
* The dibi driver for PDO. * The dibi driver for PDO.
* *
* Connection options: * Driver options:
* - 'dsn' - driver specific DSN * - dsn => driver specific DSN
* - 'username' (or 'user') * - username (or user)
* - 'password' (or 'pass') * - password (or pass)
* - 'options' - driver specific options array * - options (array) => driver specific options {@see PDO::__construct}
* - 'resource' - PDO object (optional) * - resource (PDO) => existing connection
* - 'lazy' - if TRUE, connection will be established only when required * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -14,14 +14,14 @@
/** /**
* The dibi driver for PostgreSQL database. * The dibi driver for PostgreSQL database.
* *
* Connection 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
* - 'string' - or use connection string * - string => or use connection string
* - 'persistent' - try to find a persistent link? * - schema => the schema search path
* - 'charset' - character encoding to set * - charset => character encoding to set
* - 'schema' - the schema search path * - persistent (bool) => try to find a persistent link?
* - 'lazy' - if TRUE, connection will be established only when required * - resource (resource) => existing connection resource
* - 'resource' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -14,16 +14,16 @@
/** /**
* The dibi driver for SQLite database. * The dibi driver for SQLite database.
* *
* Connection options: * Driver options:
* - 'database' (or 'file') - the filename of the SQLite database * - database (or file) => the filename of the SQLite database
* - 'persistent' - try to find a persistent link? * - persistent (bool) => try to find a persistent link?
* - 'unbuffered' - sends query without fetching and buffering the result rows automatically? * - unbuffered (bool) => sends query without fetching and buffering the result rows automatically?
* - 'lazy' - if TRUE, connection will be established only when required * - formatDate => how to format date in SQL (@see date)
* - 'formatDate' - how to format date in SQL (@see date) * - formatDateTime => how to format datetime in SQL (@see date)
* - 'formatDateTime' - how to format datetime in SQL (@see date) * - 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 (resource) => existing connection resource
* - 'resource' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -14,14 +14,14 @@
/** /**
* The dibi driver for SQLite3 database. * The dibi driver for SQLite3 database.
* *
* Connection options: * Driver options:
* - 'database' (or 'file') - the filename of the SQLite3 database * - database (or file) => the filename of the SQLite3 database
* - 'lazy' - if TRUE, connection will be established only when required * - formatDate => how to format date in SQL (@see date)
* - 'formatDate' - how to format date in SQL (@see date) * - formatDateTime => how to format datetime in SQL (@see date)
* - 'formatDateTime' - how to format datetime in SQL (@see date) * - 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' - connection resource (optional) * - lazy, profiler, result, substitutes, ... => see DibiConnection options
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers * @package dibi\drivers

View File

@@ -46,7 +46,16 @@ class DibiConnection extends DibiObject
/** /**
* Creates object and (optionally) connects to a database. * Connection options: (see driver-specific options too)
* - lazy (bool) => if TRUE, connection will be established only when required
* - result (array) => result set options
* - detectTypes (bool) => detect the types of result set fields?
* - formatDateTime => date-time format (if empty, DateTime objects will be returned)
* - profiler (array or bool)
* - run (bool) => enable profiler?
* - class => profiler class name (default is DibiProfiler)
* - substitutes (array) => map of driver specific substitutes (under development)
* @param mixed connection parameters * @param mixed connection parameters
* @param string connection name * @param string connection name
* @throws DibiException * @throws DibiException

View File

@@ -497,7 +497,7 @@ class DibiColumnInfo extends DibiObject
*/ */
public function getFullName() public function getFullName()
{ {
return $this->info['fullname']; return isset($this->info['fullname']) ? $this->info['fullname'] : NULL;
} }
@@ -613,7 +613,7 @@ class DibiColumnInfo extends DibiObject
* Heuristic type detection. * Heuristic type detection.
* @param string * @param string
* @return string * @return string
* @internal * @internal
*/ */
public static function detectType($type) public static function detectType($type)
{ {

View File

@@ -95,7 +95,7 @@ class DibiFluent extends DibiObject implements IDataSource
/** @var array */ /** @var array */
private $cursor; private $cursor;
/** @var DibiLazyStorage normalized clauses */ /** @var DibiLazyStorage normalized clauses */
private static $normalizer; private static $normalizer;
@@ -476,7 +476,7 @@ class DibiFluent extends DibiObject implements IDataSource
* Format camelCase clause name to UPPER CASE. * Format camelCase clause name to UPPER CASE.
* @param string * @param string
* @return string * @return string
* @internal * @internal
*/ */
public static function _formatClause($s) public static function _formatClause($s)
{ {

View File

@@ -13,7 +13,7 @@
/** /**
* dibi result-set. * dibi result set.
* *
* <code> * <code>
* $result = dibi::query('SELECT * FROM [table]'); * $result = dibi::query('SELECT * FROM [table]');
@@ -28,10 +28,6 @@
* unset($result); * unset($result);
* </code> * </code>
* *
* Result options:
* - 'detectTypes' - whether call automatically detectTypes()
* - 'formatDateTime' - how to format datetime
*
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi * @package dibi
* *
@@ -648,7 +644,7 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Displays complete result-set as HTML table for debug purposes. * Displays complete result set as HTML table for debug purposes.
* @return void * @return void
*/ */
final public function dump() final public function dump()

View File

@@ -13,7 +13,7 @@
/** /**
* Result-set single row. * Result set single row.
* *
* @copyright Copyright (c) 2005, 2010 David Grudl * @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi * @package dibi

View File

@@ -556,7 +556,7 @@ final class DibiTranslator extends DibiObject
* Apply substitutions to indentifier and delimites it. * Apply substitutions to indentifier and delimites it.
* @param string indentifier * @param string indentifier
* @return string * @return string
* @internal * @internal
*/ */
public function delimite($value) public function delimite($value)
{ {

View File

@@ -221,8 +221,7 @@ interface IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
* @return array * @return array of {name, nativetype [, table, fullname, (int) size, (bool) nullable, (mixed) default, (bool) autoincrement, (array) vendor ]}
* @throws DibiException
*/ */
function getColumnsMeta(); function getColumnsMeta();
@@ -248,21 +247,21 @@ interface IDibiReflector
/** /**
* Returns list of tables. * Returns list of tables.
* @return array * @return array of {name [, (bool) view ]}
*/ */
function getTables(); function getTables();
/** /**
* Returns metadata for all columns in a table. * Returns metadata for all columns in a table.
* @param string * @param string
* @return array * @return array of {name, nativetype [, table, fullname, (int) size, (bool) nullable, (mixed) default, (bool) autoincrement, (array) vendor ]}
*/ */
function getColumns($table); function getColumns($table);
/** /**
* Returns metadata for all indexes in a table. * Returns metadata for all indexes in a table.
* @param string * @param string
* @return array * @return array of {name, (array of names) columns [, (bool) unique, (bool) primary ]}
*/ */
function getIndexes($table); function getIndexes($table);