1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-02 20:27:35 +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.
*
* Connection options:
* - 'database' - the path to database file (server:/path/database.fdb)
* - 'username' (or 'user')
* - 'password' (or 'pass')
* - '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.
* - 'lazy' - if TRUE, connection will be established only when required
* - 'resource' - connection resource (optional)
* Driver options:
* - database => the path to database file (server:/path/database.fdb)
* - username (or user)
* - password (or pass)
* - 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 DibiConnection options
*
* @author Tomáš Kraina, Roman Sklenář
* @copyright Copyright (c) 2010

View File

@@ -14,14 +14,14 @@
/**
* The dibi driver for MS SQL database.
*
* Connection options:
* - 'host' - the MS SQL server host name. It can also include a port number (hostname:port)
* - 'username' (or 'user')
* - 'password' (or 'pass')
* - 'persistent' - try to find a persistent link?
* - 'database' - the database name to select
* - 'lazy' - if TRUE, connection will be established only when required
* - 'resource' - connection resource (optional)
* Driver options:
* - host => the MS SQL server host name. It can also include a port number (hostname:port)
* - username (or user)
* - password (or pass)
* - database => the database name to select
* - persistent (bool) => try to find a persistent link?
* - resource (resource) => existing connection resource
* - lazy, profiler, result, substitutes, ... => see DibiConnection options
*
* @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers

View File

@@ -14,15 +14,15 @@
/**
* The dibi driver for MS SQL Driver 2005 database.
*
* Connection options:
* - 'host' - the MS SQL server host name. It can also include a port number (hostname:port)
* - 'username'
* - 'password'
* - 'database' - the database name to select
* - 'options' - connection info array {@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)
* - 'resource' - connection resource (optional)
* Driver options:
* - host => the MS SQL server host name. It can also include a port number (hostname:port)
* - username (or user)
* - password (or pass)
* - database => the database name to select
* - options (array) => connection options {@link http://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 DibiConnection options
*
* @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -14,14 +14,14 @@
/**
* The dibi driver for PostgreSQL database.
*
* Connection options:
* - 'host','hostaddr','port','dbname','user','password','connect_timeout','options','sslmode','service' - see PostgreSQL API
* - 'string' - or use connection string
* - 'persistent' - try to find a persistent link?
* - 'charset' - character encoding to set
* - 'schema' - the schema search path
* - 'lazy' - if TRUE, connection will be established only when required
* - 'resource' - connection resource (optional)
* Driver options:
* - host, hostaddr, port, dbname, user, password, connect_timeout, options, sslmode, service => see PostgreSQL API
* - string => or use connection string
* - schema => the schema search path
* - charset => character encoding to set
* - persistent (bool) => try to find a persistent link?
* - resource (resource) => existing connection resource
* - lazy, profiler, result, substitutes, ... => see DibiConnection options
*
* @copyright Copyright (c) 2005, 2010 David Grudl
* @package dibi\drivers

View File

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

View File

@@ -14,14 +14,14 @@
/**
* The dibi driver for SQLite3 database.
*
* Connection options:
* - '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)
* - 'formatDateTime' - how to format datetime in SQL (@see date)
* - 'dbcharset' - database character encoding (will be converted to 'charset')
* - 'charset' - character encoding to set (default is UTF-8)
* - 'resource' - connection resource (optional)
* Driver options:
* - database (or file) => the filename of the SQLite3 database
* - formatDate => how to format date in SQL (@see date)
* - formatDateTime => how to format datetime in SQL (@see date)
* - 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 DibiConnection options
*
* @copyright Copyright (c) 2005, 2010 David Grudl
* @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 string connection name
* @throws DibiException

View File

@@ -497,7 +497,7 @@ class DibiColumnInfo extends DibiObject
*/
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.
* @param string
* @return string
* @internal
* @internal
*/
public static function detectType($type)
{

View File

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

View File

@@ -13,7 +13,7 @@
/**
* dibi result-set.
* dibi result set.
*
* <code>
* $result = dibi::query('SELECT * FROM [table]');
@@ -28,10 +28,6 @@
* unset($result);
* </code>
*
* Result options:
* - 'detectTypes' - whether call automatically detectTypes()
* - 'formatDateTime' - how to format datetime
*
* @copyright Copyright (c) 2005, 2010 David Grudl
* @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
*/
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
* @package dibi

View File

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

View File

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