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

- phpDoc simplified

This commit is contained in:
David Grudl
2008-10-28 15:24:47 +00:00
parent 7565ffb1d4
commit a2d0d66d0f
16 changed files with 98 additions and 423 deletions

View File

@@ -90,100 +90,68 @@ require_once dirname(__FILE__) . '/libs/DibiProfiler.php';
*/ */
class dibi class dibi
{ {
/** /**#@+
* Column type in relation to PHP native type. * dibi column type
*/ */
const const FIELD_TEXT = 's'; // as 'string'
FIELD_TEXT = 's', // as 'string' const FIELD_BINARY = 'bin';
FIELD_BINARY = 'bin', const FIELD_BOOL = 'b';
FIELD_BOOL = 'b', const FIELD_INTEGER = 'i';
FIELD_INTEGER = 'i', const FIELD_FLOAT = 'f';
FIELD_FLOAT = 'f', const FIELD_DATE = 'd';
FIELD_DATE = 'd', const FIELD_DATETIME = 't';
FIELD_DATETIME = 't', const FIELD_TIME = 't';
FIELD_TIME = 't', /**#@-*/
// special
IDENTIFIER = 'n';
/** /**
* Identifier type
*/
const IDENTIFIER = 'n';
/**#@+
* dibi version * dibi version
*/ */
const const VERSION = '0.9';
VERSION = '0.9', const REVISION = '$WCREV$ released on $WCDATE$';
REVISION = '$WCREV$ released on $WCDATE$'; /**#@-*/
/** /**
* Configuration options * Configuration options
*/ */
const const RESULT_WITH_TABLES = 'resultWithTables'; // for MySQL
RESULT_WITH_TABLES = 'resultWithTables'; // for MySQL
/** /** @var DibiConnection[] Connection registry storage for DibiConnection objects */
* Connection registry storage for DibiConnection objects.
* @var DibiConnection[]
*/
private static $registry = array(); private static $registry = array();
/** /** @var DibiConnection Current connection */
* Current connection.
* @var DibiConnection
*/
private static $connection; private static $connection;
/** /** @var array Substitutions for identifiers */
* Substitutions for identifiers.
* @var array
*/
private static $substs = array(); private static $substs = array();
/** /** @var callback Substitution fallback */
* Substitution fallback.
* @var callback
*/
private static $substFallBack; private static $substFallBack;
/** /** @var array @see addHandler */
* @see addHandler
* @var array
*/
private static $handlers = array(); private static $handlers = array();
/** /** @var string Last SQL command @see dibi::query() */
* Last SQL command @see dibi::query()
* @var string
*/
public static $sql; public static $sql;
/** /** @var int Elapsed time for last query */
* Elapsed time for last query.
* @var int
*/
public static $elapsedTime; public static $elapsedTime;
/** /** @var int Elapsed time for all queries */
* Elapsed time for all queries.
* @var int
*/
public static $totalTime; public static $totalTime;
/** /** @var int Number or queries */
* Number or queries.
* @var int
*/
public static $numOfQueries = 0; public static $numOfQueries = 0;
/** /** @var string Default dibi driver */
* Default dibi driver.
* @var string
*/
public static $defaultDriver = 'mysql'; public static $defaultDriver = 'mysql';
/** /**
* Static class - cannot be instantiated. * Static class - cannot be instantiated.
*/ */
@@ -200,7 +168,6 @@ class dibi
/** /**
* Creates a new DibiConnection object and connects it to specified database. * Creates a new DibiConnection object and connects it to specified database.
*
* @param array|string|ArrayObject connection parameters * @param array|string|ArrayObject connection parameters
* @param string connection name * @param string connection name
* @return DibiConnection * @return DibiConnection
@@ -215,7 +182,6 @@ class dibi
/** /**
* Disconnects from database (doesn't destroy DibiConnection object). * Disconnects from database (doesn't destroy DibiConnection object).
*
* @return void * @return void
*/ */
public static function disconnect() public static function disconnect()
@@ -227,7 +193,6 @@ class dibi
/** /**
* Returns TRUE when connection was established. * Returns TRUE when connection was established.
*
* @return bool * @return bool
*/ */
public static function isConnected() public static function isConnected()
@@ -239,7 +204,6 @@ class dibi
/** /**
* Retrieve active connection. * Retrieve active connection.
*
* @param string connection registy name * @param string connection registy name
* @return DibiConnection * @return DibiConnection
* @throws DibiException * @throws DibiException
@@ -265,7 +229,6 @@ class dibi
/** /**
* Change active connection. * Change active connection.
*
* @param string connection registy name * @param string connection registy name
* @return void * @return void
* @throws DibiException * @throws DibiException
@@ -295,7 +258,6 @@ class dibi
/** /**
* Generates and executes SQL query - Monostate for DibiConnection::query(). * Generates and executes SQL query - Monostate for DibiConnection::query().
*
* @param array|mixed one or more arguments * @param array|mixed one or more arguments
* @return DibiResult|NULL result set object (if any) * @return DibiResult|NULL result set object (if any)
* @throws DibiException * @throws DibiException
@@ -310,7 +272,6 @@ class dibi
/** /**
* Executes the SQL query - Monostate for DibiConnection::nativeQuery(). * Executes the SQL query - Monostate for DibiConnection::nativeQuery().
*
* @param string SQL statement. * @param string SQL statement.
* @return DibiResult|NULL result set object (if any) * @return DibiResult|NULL result set object (if any)
*/ */
@@ -323,7 +284,6 @@ class dibi
/** /**
* Generates and prints SQL query - Monostate for DibiConnection::test(). * Generates and prints SQL query - Monostate for DibiConnection::test().
*
* @param array|mixed one or more arguments * @param array|mixed one or more arguments
* @return bool * @return bool
*/ */
@@ -337,7 +297,6 @@ class dibi
/** /**
* Executes SQL query and fetch result - Monostate for DibiConnection::query() & fetch(). * Executes SQL query and fetch result - Monostate for DibiConnection::query() & fetch().
*
* @param array|mixed one or more arguments * @param array|mixed one or more arguments
* @return DibiRow * @return DibiRow
* @throws DibiException * @throws DibiException
@@ -352,7 +311,6 @@ class dibi
/** /**
* Executes SQL query and fetch results - Monostate for DibiConnection::query() & fetchAll(). * Executes SQL query and fetch results - Monostate for DibiConnection::query() & fetchAll().
*
* @param array|mixed one or more arguments * @param array|mixed one or more arguments
* @return array of DibiRow * @return array of DibiRow
* @throws DibiException * @throws DibiException
@@ -367,7 +325,6 @@ class dibi
/** /**
* Executes SQL query and fetch first column - Monostate for DibiConnection::query() & fetchSingle(). * Executes SQL query and fetch first column - Monostate for DibiConnection::query() & fetchSingle().
*
* @param array|mixed one or more arguments * @param array|mixed one or more arguments
* @return string * @return string
* @throws DibiException * @throws DibiException
@@ -382,7 +339,6 @@ class dibi
/** /**
* Executes SQL query and fetch pairs - Monostate for DibiConnection::query() & fetchPairs(). * Executes SQL query and fetch pairs - Monostate for DibiConnection::query() & fetchPairs().
*
* @param array|mixed one or more arguments * @param array|mixed one or more arguments
* @return string * @return string
* @throws DibiException * @throws DibiException
@@ -398,7 +354,6 @@ class dibi
/** /**
* Gets the number of affected rows. * Gets the number of affected rows.
* Monostate for DibiConnection::affectedRows() * Monostate for DibiConnection::affectedRows()
*
* @return int number of rows * @return int number of rows
* @throws DibiException * @throws DibiException
*/ */
@@ -412,7 +367,6 @@ class dibi
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
* Monostate for DibiConnection::insertId() * Monostate for DibiConnection::insertId()
*
* @param string optional sequence name * @param string optional sequence name
* @return int * @return int
* @throws DibiException * @throws DibiException
@@ -462,7 +416,6 @@ class dibi
/** /**
* Gets a information about the current database - Monostate for DibiConnection::getDatabaseInfo(). * Gets a information about the current database - Monostate for DibiConnection::getDatabaseInfo().
*
* @return DibiDatabaseInfo * @return DibiDatabaseInfo
*/ */
public static function getDatabaseInfo() public static function getDatabaseInfo()
@@ -474,7 +427,6 @@ class dibi
/** /**
* Import SQL dump from file - extreme fast! * Import SQL dump from file - extreme fast!
*
* @param string filename * @param string filename
* @return int count of sql commands * @return int count of sql commands
*/ */
@@ -565,7 +517,6 @@ class dibi
/** /**
* Pseudotype for timestamp representation. * Pseudotype for timestamp representation.
*
* @param mixed datetime * @param mixed datetime
* @return DibiVariable * @return DibiVariable
*/ */
@@ -585,7 +536,6 @@ class dibi
/** /**
* Pseudotype for date representation. * Pseudotype for date representation.
*
* @param mixed date * @param mixed date
* @return DibiVariable * @return DibiVariable
*/ */
@@ -604,7 +554,6 @@ class dibi
/** /**
* Create a new substitution pair for indentifiers. * Create a new substitution pair for indentifiers.
*
* @param string from * @param string from
* @param string to * @param string to
* @return void * @return void
@@ -618,7 +567,6 @@ class dibi
/** /**
* Sets substitution fallback handler. * Sets substitution fallback handler.
*
* @param callback * @param callback
* @return void * @return void
*/ */
@@ -635,7 +583,6 @@ class dibi
/** /**
* Remove substitution pair. * Remove substitution pair.
*
* @param mixed from or TRUE * @param mixed from or TRUE
* @return void * @return void
*/ */
@@ -652,7 +599,6 @@ class dibi
/** /**
* Provides substitution. * Provides substitution.
*
* @param string * @param string
* @return string * @return string
*/ */
@@ -670,7 +616,6 @@ class dibi
/** /**
* Substitution callback. * Substitution callback.
*
* @param array * @param array
* @return string * @return string
*/ */
@@ -696,7 +641,6 @@ class dibi
/** /**
* Prints out a syntax highlighted version of the SQL command or DibiResult. * Prints out a syntax highlighted version of the SQL command or DibiResult.
*
* @param string|DibiResult * @param string|DibiResult
* @param bool return output instead of printing it? * @param bool return output instead of printing it?
* @return string * @return string

View File

@@ -37,17 +37,11 @@
class DibiMsSqlDriver extends DibiObject implements IDibiDriver class DibiMsSqlDriver extends DibiObject implements IDibiDriver
{ {
/** /** @var resource Connection resource */
* Connection resource.
* @var resource
*/
private $connection; private $connection;
/** /** @var resource Resultset resource */
* Resultset resource.
* @var resource
*/
private $resultSet; private $resultSet;
@@ -66,7 +60,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Connects to a database. * Connects to a database.
*
* @return void * @return void
* @throws DibiException * @throws DibiException
*/ */
@@ -95,7 +88,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
*/ */
public function disconnect() public function disconnect()
@@ -107,7 +99,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Executes the SQL query. * Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @return IDibiDriver|NULL * @return IDibiDriver|NULL
* @throws DibiDriverException * @throws DibiDriverException
@@ -127,7 +118,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error * @return int|FALSE number of rows or FALSE on error
*/ */
public function affectedRows() public function affectedRows()
@@ -139,7 +129,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure * @return int|FALSE int on success or FALSE on failure
*/ */
public function insertId($sequence) public function insertId($sequence)
@@ -187,7 +176,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return mixed * @return mixed
*/ */
public function getResource() public function getResource()
@@ -203,7 +191,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value * @return string encoded value
@@ -239,7 +226,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -254,7 +240,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -280,7 +265,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
public function rowCount() public function rowCount()
@@ -292,10 +276,9 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Fetches the row at current position and moves the internal cursor to the next position. * Fetches the row at current position and moves the internal cursor to the next position.
* internal usage only
*
* @param bool TRUE for associative array, FALSE for numeric * @param bool TRUE for associative array, FALSE for numeric
* @return array array on success, nonarray if no next record * @return array array on success, nonarray if no next record
* @internal
*/ */
public function fetch($assoc) public function fetch($assoc)
{ {
@@ -306,7 +289,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -320,7 +302,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function free() public function free()
@@ -333,7 +314,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
*
* @return array * @return array
*/ */
public function getColumnsMeta() public function getColumnsMeta()
@@ -356,7 +336,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return mixed * @return mixed
*/ */
public function getResultResource() public function getResultResource()

View File

@@ -43,24 +43,15 @@
class DibiMySqlDriver extends DibiObject implements IDibiDriver class DibiMySqlDriver extends DibiObject implements IDibiDriver
{ {
/** /** @var resource Connection resource */
* Connection resource.
* @var resource
*/
private $connection; private $connection;
/** /** @var resource Resultset resource */
* Resultset resource.
* @var resource
*/
private $resultSet; private $resultSet;
/** /** @var bool Is buffered (seekable and countable)? */
* Is buffered (seekable and countable)?
* @var bool
*/
private $buffered; private $buffered;
@@ -79,7 +70,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Connects to a database. * Connects to a database.
*
* @return void * @return void
* @throws DibiException * @throws DibiException
*/ */
@@ -153,7 +143,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
*/ */
public function disconnect() public function disconnect()
@@ -165,7 +154,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Executes the SQL query. * Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @return IDibiDriver|NULL * @return IDibiDriver|NULL
* @throws DibiDriverException * @throws DibiDriverException
@@ -189,7 +177,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error * @return int|FALSE number of rows or FALSE on error
*/ */
public function affectedRows() public function affectedRows()
@@ -201,7 +188,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure * @return int|FALSE int on success or FALSE on failure
*/ */
public function insertId($sequence) public function insertId($sequence)
@@ -249,7 +235,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return mixed * @return mixed
*/ */
public function getResource() public function getResource()
@@ -265,7 +250,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value * @return string encoded value
@@ -301,7 +285,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -316,7 +299,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -339,7 +321,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
public function rowCount() public function rowCount()
@@ -354,10 +335,9 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Fetches the row at current position and moves the internal cursor to the next position. * Fetches the row at current position and moves the internal cursor to the next position.
* internal usage only
*
* @param bool TRUE for associative array, FALSE for numeric * @param bool TRUE for associative array, FALSE for numeric
* @return array array on success, nonarray if no next record * @return array array on success, nonarray if no next record
* @internal
*/ */
public function fetch($assoc) public function fetch($assoc)
{ {
@@ -368,7 +348,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -386,7 +365,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function free() public function free()
@@ -399,7 +377,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
*
* @return array * @return array
*/ */
public function getColumnsMeta() public function getColumnsMeta()
@@ -423,7 +400,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return mixed * @return mixed
*/ */
public function getResultResource() public function getResultResource()

View File

@@ -43,24 +43,15 @@
class DibiMySqliDriver extends DibiObject implements IDibiDriver class DibiMySqliDriver extends DibiObject implements IDibiDriver
{ {
/** /** @var mysqli Connection resource */
* Connection resource.
* @var mysqli
*/
private $connection; private $connection;
/** /** @var mysqli_result Resultset resource */
* Resultset resource.
* @var mysqli_result
*/
private $resultSet; private $resultSet;
/** /** @var bool Is buffered (seekable and countable)? */
* Is buffered (seekable and countable)?
* @var bool
*/
private $buffered; private $buffered;
@@ -79,7 +70,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Connects to a database. * Connects to a database.
*
* @return void * @return void
* @throws DibiException * @throws DibiException
*/ */
@@ -141,7 +131,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
*/ */
public function disconnect() public function disconnect()
@@ -153,7 +142,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Executes the SQL query. * Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @return IDibiDriver|NULL * @return IDibiDriver|NULL
* @throws DibiDriverException * @throws DibiDriverException
@@ -173,7 +161,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error * @return int|FALSE number of rows or FALSE on error
*/ */
public function affectedRows() public function affectedRows()
@@ -185,7 +172,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure * @return int|FALSE int on success or FALSE on failure
*/ */
public function insertId($sequence) public function insertId($sequence)
@@ -233,7 +219,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return mysqli * @return mysqli
*/ */
public function getResource() public function getResource()
@@ -249,7 +234,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value * @return string encoded value
@@ -284,7 +268,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -299,7 +282,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -322,7 +304,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
public function rowCount() public function rowCount()
@@ -337,10 +318,9 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Fetches the row at current position and moves the internal cursor to the next position. * Fetches the row at current position and moves the internal cursor to the next position.
* internal usage only
*
* @param bool TRUE for associative array, FALSE for numeric * @param bool TRUE for associative array, FALSE for numeric
* @return array array on success, nonarray if no next record * @return array array on success, nonarray if no next record
* @internal
*/ */
public function fetch($assoc) public function fetch($assoc)
{ {
@@ -351,7 +331,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -368,7 +347,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function free() public function free()
@@ -381,7 +359,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
*
* @return array * @return array
*/ */
public function getColumnsMeta() public function getColumnsMeta()
@@ -415,7 +392,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return mysqli_result * @return mysqli_result
*/ */
public function getResultResource() public function getResultResource()

View File

@@ -36,24 +36,15 @@
class DibiOdbcDriver extends DibiObject implements IDibiDriver class DibiOdbcDriver extends DibiObject implements IDibiDriver
{ {
/** /** @var resource Connection resource */
* Connection resource.
* @var resource
*/
private $connection; private $connection;
/** /** @var resource Resultset resource */
* Resultset resource.
* @var resource
*/
private $resultSet; private $resultSet;
/** /** @var int Cursor */
* Cursor.
* @var int
*/
private $row = 0; private $row = 0;
@@ -72,7 +63,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Connects to a database. * Connects to a database.
*
* @return void * @return void
* @throws DibiException * @throws DibiException
*/ */
@@ -101,7 +91,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
*/ */
public function disconnect() public function disconnect()
@@ -113,7 +102,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Executes the SQL query. * Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @return IDibiDriver|NULL * @return IDibiDriver|NULL
* @throws DibiDriverException * @throws DibiDriverException
@@ -133,7 +121,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error * @return int|FALSE number of rows or FALSE on error
*/ */
public function affectedRows() public function affectedRows()
@@ -145,7 +132,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure * @return int|FALSE int on success or FALSE on failure
*/ */
public function insertId($sequence) public function insertId($sequence)
@@ -201,7 +187,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return mixed * @return mixed
*/ */
public function getResource() public function getResource()
@@ -217,7 +202,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value * @return string encoded value
@@ -252,7 +236,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -267,7 +250,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -291,7 +273,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
public function rowCount() public function rowCount()
@@ -304,10 +285,9 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Fetches the row at current position and moves the internal cursor to the next position. * Fetches the row at current position and moves the internal cursor to the next position.
* internal usage only
*
* @param bool TRUE for associative array, FALSE for numeric * @param bool TRUE for associative array, FALSE for numeric
* @return array array on success, nonarray if no next record * @return array array on success, nonarray if no next record
* @internal
*/ */
public function fetch($assoc) public function fetch($assoc)
{ {
@@ -327,7 +307,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -342,7 +321,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function free() public function free()
@@ -355,7 +333,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
*
* @return array * @return array
*/ */
public function getColumnsMeta() public function getColumnsMeta()
@@ -377,7 +354,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return mixed * @return mixed
*/ */
public function getResultResource() public function getResultResource()

View File

@@ -36,23 +36,15 @@
class DibiOracleDriver extends DibiObject implements IDibiDriver class DibiOracleDriver extends DibiObject implements IDibiDriver
{ {
/** /** @var resource Connection resource */
* Connection resource.
* @var resource
*/
private $connection; private $connection;
/** /** @var resource Resultset resource */
* Resultset resource.
* @var resource
*/
private $resultSet; private $resultSet;
/** /** @var bool */
* @var bool
*/
private $autocommit = TRUE; private $autocommit = TRUE;
@@ -71,7 +63,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Connects to a database. * Connects to a database.
*
* @return void * @return void
* @throws DibiException * @throws DibiException
*/ */
@@ -94,7 +85,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
*/ */
public function disconnect() public function disconnect()
@@ -106,7 +96,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Executes the SQL query. * Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @return IDibiDriver|NULL * @return IDibiDriver|NULL
* @throws DibiDriverException * @throws DibiDriverException
@@ -133,7 +122,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error * @return int|FALSE number of rows or FALSE on error
*/ */
public function affectedRows() public function affectedRows()
@@ -145,7 +133,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure * @return int|FALSE int on success or FALSE on failure
*/ */
public function insertId($sequence) public function insertId($sequence)
@@ -201,7 +188,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return mixed * @return mixed
*/ */
public function getResource() public function getResource()
@@ -217,7 +203,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value * @return string encoded value
@@ -253,7 +238,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -268,7 +252,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -288,7 +271,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
public function rowCount() public function rowCount()
@@ -300,10 +282,9 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Fetches the row at current position and moves the internal cursor to the next position. * Fetches the row at current position and moves the internal cursor to the next position.
* internal usage only
*
* @param bool TRUE for associative array, FALSE for numeric * @param bool TRUE for associative array, FALSE for numeric
* @return array array on success, nonarray if no next record * @return array array on success, nonarray if no next record
* @internal
*/ */
public function fetch($assoc) public function fetch($assoc)
{ {
@@ -314,7 +295,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -328,7 +308,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function free() public function free()
@@ -341,7 +320,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
*
* @return array * @return array
*/ */
public function getColumnsMeta() public function getColumnsMeta()
@@ -363,7 +341,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return mixed * @return mixed
*/ */
public function getResultResource() public function getResultResource()

View File

@@ -37,24 +37,15 @@
class DibiPdoDriver extends DibiObject implements IDibiDriver class DibiPdoDriver extends DibiObject implements IDibiDriver
{ {
/** /** @var PDO Connection resource */
* Connection resource.
* @var PDO
*/
private $connection; private $connection;
/** /** @var PDOStatement Resultset resource */
* Resultset resource.
* @var PDOStatement
*/
private $resultSet; private $resultSet;
/** /** @var int|FALSE Affected rows */
* Affected rows.
* @var int|FALSE
*/
private $affectedRows = FALSE; private $affectedRows = FALSE;
@@ -73,7 +64,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Connects to a database. * Connects to a database.
*
* @return void * @return void
* @throws DibiException * @throws DibiException
*/ */
@@ -104,7 +94,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
*/ */
public function disconnect() public function disconnect()
@@ -116,7 +105,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Executes the SQL query. * Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @return IDibiDriver|NULL * @return IDibiDriver|NULL
* @throws DibiDriverException * @throws DibiDriverException
@@ -155,7 +143,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error * @return int|FALSE number of rows or FALSE on error
*/ */
public function affectedRows() public function affectedRows()
@@ -167,7 +154,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure * @return int|FALSE int on success or FALSE on failure
*/ */
public function insertId($sequence) public function insertId($sequence)
@@ -224,7 +210,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return PDO * @return PDO
*/ */
public function getResource() public function getResource()
@@ -240,7 +225,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value * @return string encoded value
@@ -300,7 +284,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -315,7 +298,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -334,7 +316,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
public function rowCount() public function rowCount()
@@ -346,10 +327,9 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Fetches the row at current position and moves the internal cursor to the next position. * Fetches the row at current position and moves the internal cursor to the next position.
* internal usage only
*
* @param bool TRUE for associative array, FALSE for numeric * @param bool TRUE for associative array, FALSE for numeric
* @return array array on success, nonarray if no next record * @return array array on success, nonarray if no next record
* @internal
*/ */
public function fetch($assoc) public function fetch($assoc)
{ {
@@ -360,7 +340,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -374,7 +353,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function free() public function free()
@@ -386,7 +364,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
*
* @return array * @return array
* @throws DibiException * @throws DibiException
*/ */
@@ -414,7 +391,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return PDOStatement * @return PDOStatement
*/ */
public function getResultResource() public function getResultResource()

View File

@@ -37,24 +37,15 @@
class DibiPostgreDriver extends DibiObject implements IDibiDriver class DibiPostgreDriver extends DibiObject implements IDibiDriver
{ {
/** /** @var resource Connection resource */
* Connection resource.
* @var resource
*/
private $connection; private $connection;
/** /** @var resource Resultset resource */
* Resultset resource.
* @var resource
*/
private $resultSet; private $resultSet;
/** /** @var bool Escape method */
* Escape method.
* @var bool
*/
private $escMethod = FALSE; private $escMethod = FALSE;
@@ -73,7 +64,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Connects to a database. * Connects to a database.
*
* @return void * @return void
* @throws DibiException * @throws DibiException
*/ */
@@ -121,7 +111,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
*/ */
public function disconnect() public function disconnect()
@@ -133,7 +122,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Executes the SQL query. * Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @param bool update affected rows? * @param bool update affected rows?
* @return IDibiDriver|NULL * @return IDibiDriver|NULL
@@ -154,7 +142,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error * @return int|FALSE number of rows or FALSE on error
*/ */
public function affectedRows() public function affectedRows()
@@ -166,7 +153,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure * @return int|FALSE int on success or FALSE on failure
*/ */
public function insertId($sequence) public function insertId($sequence)
@@ -225,7 +211,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return mixed * @return mixed
*/ */
public function getResource() public function getResource()
@@ -241,7 +226,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value * @return string encoded value
@@ -292,7 +276,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -313,7 +296,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -336,7 +318,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
public function rowCount() public function rowCount()
@@ -348,10 +329,9 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Fetches the row at current position and moves the internal cursor to the next position. * Fetches the row at current position and moves the internal cursor to the next position.
* internal usage only
*
* @param bool TRUE for associative array, FALSE for numeric * @param bool TRUE for associative array, FALSE for numeric
* @return array array on success, nonarray if no next record * @return array array on success, nonarray if no next record
* @internal
*/ */
public function fetch($assoc) public function fetch($assoc)
{ {
@@ -362,7 +342,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -376,7 +355,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function free() public function free()
@@ -389,7 +367,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
*
* @return array * @return array
*/ */
public function getColumnsMeta() public function getColumnsMeta()
@@ -413,7 +390,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return mixed * @return mixed
*/ */
public function getResultResource() public function getResultResource()

View File

@@ -37,31 +37,19 @@
class DibiSqliteDriver extends DibiObject implements IDibiDriver class DibiSqliteDriver extends DibiObject implements IDibiDriver
{ {
/** /** @var resource Connection resource */
* Connection resource.
* @var resource
*/
private $connection; private $connection;
/** /** @var resource Resultset resource */
* Resultset resource.
* @var resource
*/
private $resultSet; private $resultSet;
/** /** @var bool Is buffered (seekable and countable)? */
* Is buffered (seekable and countable)?
* @var bool
*/
private $buffered; private $buffered;
/** /** @var string Date and datetime format */
* Date and datetime format.
* @var string
*/
private $fmtDate, $fmtDateTime; private $fmtDate, $fmtDateTime;
@@ -80,7 +68,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Connects to a database. * Connects to a database.
*
* @return void * @return void
* @throws DibiException * @throws DibiException
*/ */
@@ -108,7 +95,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
*/ */
public function disconnect() public function disconnect()
@@ -120,7 +106,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Executes the SQL query. * Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @return IDibiDriver|NULL * @return IDibiDriver|NULL
* @throws DibiDriverException * @throws DibiDriverException
@@ -144,7 +129,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error * @return int|FALSE number of rows or FALSE on error
*/ */
public function affectedRows() public function affectedRows()
@@ -156,7 +140,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure * @return int|FALSE int on success or FALSE on failure
*/ */
public function insertId($sequence) public function insertId($sequence)
@@ -204,7 +187,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return mixed * @return mixed
*/ */
public function getResource() public function getResource()
@@ -220,7 +202,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value * @return string encoded value
@@ -254,7 +235,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -269,7 +249,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -289,7 +268,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
public function rowCount() public function rowCount()
@@ -304,10 +282,9 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Fetches the row at current position and moves the internal cursor to the next position. * Fetches the row at current position and moves the internal cursor to the next position.
* internal usage only
*
* @param bool TRUE for associative array, FALSE for numeric * @param bool TRUE for associative array, FALSE for numeric
* @return array array on success, nonarray if no next record * @return array array on success, nonarray if no next record
* @internal
*/ */
public function fetch($assoc) public function fetch($assoc)
{ {
@@ -326,7 +303,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -343,7 +319,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function free() public function free()
@@ -355,7 +330,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
*
* @return array * @return array
*/ */
public function getColumnsMeta() public function getColumnsMeta()
@@ -379,7 +353,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return mixed * @return mixed
*/ */
public function getResultResource() public function getResultResource()

View File

@@ -29,41 +29,25 @@
*/ */
class DibiConnection extends DibiObject class DibiConnection extends DibiObject
{ {
/** /** @var array Current connection configuration */
* Current connection configuration.
* @var array
*/
private $config; private $config;
/** /** @var IDibiDriver Driver */
* Driver
* @var IDibiDriver
*/
private $driver; private $driver;
/** /** @var IDibiProfiler Profiler */
* Profiler
* @var IDibiProfiler
*/
private $profiler; private $profiler;
/** /** @var bool Is connected? */
* Is connected?
* @var bool
*/
private $connected = FALSE; private $connected = FALSE;
/** /** @var bool Is in transaction? */
* Is in transaction?
* @var bool
*/
private $inTxn = FALSE; private $inTxn = FALSE;
/** /**
* Creates object and (optionally) connects to a database. * Creates object and (optionally) connects to a database.
*
* @param array|string|ArrayObject connection parameters * @param array|string|ArrayObject connection parameters
* @param string connection name * @param string connection name
* @throws DibiException * @throws DibiException
@@ -123,7 +107,6 @@ class DibiConnection extends DibiObject
/** /**
* Automatically frees the resources allocated for this result set. * Automatically frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function __destruct() public function __destruct()
@@ -136,7 +119,6 @@ class DibiConnection extends DibiObject
/** /**
* Connects to a database. * Connects to a database.
*
* @return void * @return void
*/ */
final protected function connect() final protected function connect()
@@ -157,7 +139,6 @@ class DibiConnection extends DibiObject
/** /**
* Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
*/ */
final public function disconnect() final public function disconnect()
@@ -175,7 +156,6 @@ class DibiConnection extends DibiObject
/** /**
* Returns TRUE when connection was established. * Returns TRUE when connection was established.
*
* @return bool * @return bool
*/ */
final public function isConnected() final public function isConnected()
@@ -187,7 +167,6 @@ class DibiConnection extends DibiObject
/** /**
* Returns configuration variable. If no $key is passed, returns the entire array. * Returns configuration variable. If no $key is passed, returns the entire array.
*
* @see self::__construct * @see self::__construct
* @param string * @param string
* @param mixed default value to use if key not found * @param mixed default value to use if key not found
@@ -210,7 +189,6 @@ class DibiConnection extends DibiObject
/** /**
* Apply configuration alias or default values. * Apply configuration alias or default values.
*
* @param array connect configuration * @param array connect configuration
* @param string key * @param string key
* @param string alias key * @param string alias key
@@ -232,7 +210,6 @@ class DibiConnection extends DibiObject
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return resource * @return resource
*/ */
final public function getResource() final public function getResource()
@@ -244,7 +221,6 @@ class DibiConnection extends DibiObject
/** /**
* Generates (translates) and executes SQL query. * Generates (translates) and executes SQL query.
*
* @param array|mixed one or more arguments * @param array|mixed one or more arguments
* @return DibiResult|NULL result set object (if any) * @return DibiResult|NULL result set object (if any)
* @throws DibiException * @throws DibiException
@@ -265,7 +241,6 @@ class DibiConnection extends DibiObject
/** /**
* Generates and prints SQL query. * Generates and prints SQL query.
*
* @param array|mixed one or more arguments * @param array|mixed one or more arguments
* @return bool * @return bool
*/ */
@@ -283,7 +258,6 @@ class DibiConnection extends DibiObject
/** /**
* Executes the SQL query. * Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @return DibiResult|NULL result set object (if any) * @return DibiResult|NULL result set object (if any)
* @throws DibiException * @throws DibiException
@@ -327,7 +301,6 @@ class DibiConnection extends DibiObject
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int number of rows * @return int number of rows
* @throws DibiException * @throws DibiException
*/ */
@@ -342,7 +315,6 @@ class DibiConnection extends DibiObject
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @param string optional sequence name * @param string optional sequence name
* @return int * @return int
* @throws DibiException * @throws DibiException
@@ -422,7 +394,6 @@ class DibiConnection extends DibiObject
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string unescaped string * @param string unescaped string
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string escaped and quoted string * @return string escaped and quoted string
@@ -437,7 +408,6 @@ class DibiConnection extends DibiObject
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -451,7 +421,6 @@ class DibiConnection extends DibiObject
/** /**
* Delimites identifier (table's or column's name, etc.). * Delimites identifier (table's or column's name, etc.).
*
* @param string identifier * @param string identifier
* @return string delimited identifier * @return string delimited identifier
*/ */
@@ -464,7 +433,6 @@ class DibiConnection extends DibiObject
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -570,7 +538,6 @@ class DibiConnection extends DibiObject
/** /**
* Import SQL dump from file - extreme fast! * Import SQL dump from file - extreme fast!
*
* @param string filename * @param string filename
* @return int count of sql commands * @return int count of sql commands
*/ */
@@ -604,7 +571,6 @@ class DibiConnection extends DibiObject
/** /**
* Gets a information about the current database. * Gets a information about the current database.
*
* @return DibiDatabaseInfo * @return DibiDatabaseInfo
*/ */
public function getDatabaseInfo() public function getDatabaseInfo()

View File

@@ -22,7 +22,10 @@
/** /**
* Reflection metadata class for a database. * Reflection metadata class for a database.
* @package dibi *
* @author David Grudl
* @copyright Copyright (c) 2005, 2008 David Grudl
* @package dibi
*/ */
class DibiDatabaseInfo extends DibiObject class DibiDatabaseInfo extends DibiObject
{ {
@@ -131,7 +134,10 @@ class DibiDatabaseInfo extends DibiObject
/** /**
* Reflection metadata class for a database table. * Reflection metadata class for a database table.
* @package dibi *
* @author David Grudl
* @copyright Copyright (c) 2005, 2008 David Grudl
* @package dibi
*/ */
class DibiTableInfo extends DibiObject class DibiTableInfo extends DibiObject
{ {
@@ -328,7 +334,10 @@ class DibiTableInfo extends DibiObject
/** /**
* Reflection metadata class for a table column. * Reflection metadata class for a table column.
* @package dibi *
* @author David Grudl
* @copyright Copyright (c) 2005, 2008 David Grudl
* @package dibi
*/ */
class DibiColumnInfo extends DibiObject class DibiColumnInfo extends DibiObject
{ {
@@ -494,7 +503,10 @@ class DibiColumnInfo extends DibiObject
/** /**
* Reflection metadata class for a foreign key. * Reflection metadata class for a foreign key.
* @package dibi *
* @author David Grudl
* @copyright Copyright (c) 2005, 2008 David Grudl
* @package dibi
* @todo * @todo
*/ */
class DibiForeignKeyInfo extends DibiObject class DibiForeignKeyInfo extends DibiObject
@@ -540,7 +552,10 @@ class DibiForeignKeyInfo extends DibiObject
/** /**
* Reflection metadata class for a index or primary key * Reflection metadata class for a index or primary key
* @package dibi *
* @author David Grudl
* @copyright Copyright (c) 2005, 2008 David Grudl
* @package dibi
*/ */
class DibiIndexInfo extends DibiObject class DibiIndexInfo extends DibiObject
{ {

View File

@@ -52,7 +52,6 @@ class DibiDriverException extends DibiException implements /*Nette::*/IDebuggabl
/** /**
* Construct an dibi driver exception. * Construct an dibi driver exception.
*
* @param string Message describing the exception * @param string Message describing the exception
* @param int Some code * @param int Some code
* @param string SQL command * @param string SQL command
@@ -113,7 +112,6 @@ class DibiDriverException extends DibiException implements /*Nette::*/IDebuggabl
/** /**
* Starts catching potential errors/warnings * Starts catching potential errors/warnings
*
* @return void * @return void
*/ */
public static function tryError() public static function tryError()
@@ -126,7 +124,6 @@ class DibiDriverException extends DibiException implements /*Nette::*/IDebuggabl
/** /**
* Returns catched error/warning message. * Returns catched error/warning message.
*
* @param string catched message * @param string catched message
* @return bool * @return bool
*/ */
@@ -142,6 +139,7 @@ class DibiDriverException extends DibiException implements /*Nette::*/IDebuggabl
/** /**
* Internal error handler. Do not call directly. * Internal error handler. Do not call directly.
* @internal
*/ */
public static function _errorHandler($code, $message) public static function _errorHandler($code, $message)
{ {

View File

@@ -71,7 +71,6 @@ abstract class DibiObject
/** /**
* Returns the name of the class of this object. * Returns the name of the class of this object.
*
* @return string * @return string
*/ */
final public /*static*/ function getClass() final public /*static*/ function getClass()
@@ -83,7 +82,6 @@ abstract class DibiObject
/** /**
* Access to reflection. * Access to reflection.
*
* @return ReflectionObject * @return ReflectionObject
*/ */
final public function getReflection() final public function getReflection()
@@ -95,7 +93,6 @@ abstract class DibiObject
/** /**
* Call to undefined method. * Call to undefined method.
*
* @param string method name * @param string method name
* @param array arguments * @param array arguments
* @return mixed * @return mixed
@@ -141,7 +138,6 @@ abstract class DibiObject
/** /**
* Call to undefined static method. * Call to undefined static method.
*
* @param string method name (in lower case!) * @param string method name (in lower case!)
* @param array arguments * @param array arguments
* @return mixed * @return mixed
@@ -157,7 +153,6 @@ abstract class DibiObject
/** /**
* Adding method to class. * Adding method to class.
*
* @param string method name * @param string method name
* @param mixed callback or closure * @param mixed callback or closure
* @return mixed * @return mixed
@@ -220,7 +215,6 @@ abstract class DibiObject
/** /**
* Returns property value. Do not call directly. * Returns property value. Do not call directly.
*
* @param string property name * @param string property name
* @return mixed property value * @return mixed property value
* @throws ::MemberAccessException if the property is not defined. * @throws ::MemberAccessException if the property is not defined.
@@ -258,7 +252,6 @@ abstract class DibiObject
/** /**
* Sets value of a property. Do not call directly. * Sets value of a property. Do not call directly.
*
* @param string property name * @param string property name
* @param mixed property value * @param mixed property value
* @return void * @return void
@@ -294,7 +287,6 @@ abstract class DibiObject
/** /**
* Is property defined? * Is property defined?
*
* @param string property name * @param string property name
* @return bool * @return bool
*/ */
@@ -308,7 +300,6 @@ abstract class DibiObject
/** /**
* Access to undeclared property. * Access to undeclared property.
*
* @param string property name * @param string property name
* @return void * @return void
* @throws ::MemberAccessException * @throws ::MemberAccessException
@@ -323,7 +314,6 @@ abstract class DibiObject
/** /**
* Has property an accessor? * Has property an accessor?
*
* @param string class name * @param string class name
* @param string method name * @param string method name
* @return bool * @return bool

View File

@@ -42,34 +42,19 @@
*/ */
class DibiResult extends DibiObject implements IDataSource class DibiResult extends DibiObject implements IDataSource
{ {
/** /** @var array IDibiDriver */
* IDibiDriver.
* @var array
*/
private $driver; private $driver;
/** /** @var array Translate table */
* Translate table.
* @var array
*/
private $xlat; private $xlat;
/** /** @var array Cache for $driver->getColumnsMeta() */
* Cache for $driver->getColumnsMeta().
* @var array
*/
private $meta; private $meta;
/** /** @var bool Already fetched? Used for allowance for first seek(0) */
* Already fetched? Used for allowance for first seek(0).
* @var bool
*/
private $fetched = FALSE; private $fetched = FALSE;
/** /** @var array|FALSE Qualifiy each column name with the table name? */
* Qualifiy each column name with the table name?
* @var array|FALSE
*/
private $withTables = FALSE; private $withTables = FALSE;
@@ -91,7 +76,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Automatically frees the resources allocated for this result set. * Automatically frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
public function __destruct() public function __destruct()
@@ -103,7 +87,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return mixed * @return mixed
*/ */
final public function getResource() final public function getResource()
@@ -115,7 +98,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -129,7 +111,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
final public function rowCount() final public function rowCount()
@@ -141,7 +122,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @return void * @return void
*/ */
final public function free() final public function free()
@@ -156,7 +136,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Qualifiy each column name with the table name? * Qualifiy each column name with the table name?
*
* @param bool * @param bool
* @return void * @return void
* @throws DibiException * @throws DibiException
@@ -185,7 +164,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Qualifiy each key with the table name? * Qualifiy each key with the table name?
*
* @return bool * @return bool
*/ */
final public function getWithTables() final public function getWithTables()
@@ -198,7 +176,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Fetches the row at current position, process optional type conversion. * Fetches the row at current position, process optional type conversion.
* and moves the internal cursor to the next position * and moves the internal cursor to the next position
*
* @return DibiRow|FALSE array on success, FALSE if no next record * @return DibiRow|FALSE array on success, FALSE if no next record
*/ */
final public function fetch() final public function fetch()
@@ -231,7 +208,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Like fetch(), but returns only first field. * Like fetch(), but returns only first field.
*
* @return mixed value on success, FALSE if no next record * @return mixed value on success, FALSE if no next record
*/ */
final public function fetchSingle() final public function fetchSingle()
@@ -255,7 +231,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Fetches all records from table. * Fetches all records from table.
*
* @param int offset * @param int offset
* @param int limit * @param int limit
* @return array of DibiRow * @return array of DibiRow
@@ -283,7 +258,6 @@ class DibiResult extends DibiObject implements IDataSource
* Fetches all records from table and returns associative tree. * Fetches all records from table and returns associative tree.
* Associative descriptor: assoc1,#,assoc2,=,assoc3,@ * Associative descriptor: assoc1,#,assoc2,=,assoc3,@
* builds a tree: $data[assoc1][index][assoc2]['assoc3']->value = {record} * builds a tree: $data[assoc1][index][assoc2]['assoc3']->value = {record}
*
* @param string associative descriptor * @param string associative descriptor
* @return DibiRow * @return DibiRow
* @throws InvalidArgumentException * @throws InvalidArgumentException
@@ -371,7 +345,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Fetches all records from table like $key => $value pairs. * Fetches all records from table like $key => $value pairs.
*
* @param string associative key * @param string associative key
* @param string value * @param string value
* @return array * @return array
@@ -456,9 +429,10 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Define multiple columns types (for internal usage). * Define multiple columns types.
* @param array * @param array
* @return void * @return void
* @internal
*/ */
final public function setTypes(array $types) final public function setTypes(array $types)
{ {
@@ -518,7 +492,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Gets an array of meta informations about columns. * Gets an array of meta informations about columns.
*
* @return array of DibiColumnInfo * @return array of DibiColumnInfo
*/ */
final public function getColumns() final public function getColumns()
@@ -549,7 +522,6 @@ 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()
@@ -611,7 +583,6 @@ class DibiResult extends DibiObject implements IDataSource
/** /**
* Safe access to property $driver. * Safe access to property $driver.
*
* @return IDibiDriver * @return IDibiDriver
* @throws InvalidStateException * @throws InvalidStateException
*/ */

View File

@@ -80,7 +80,6 @@ final class DibiTranslator extends DibiObject
/** /**
* Generates SQL. * Generates SQL.
*
* @param array * @param array
* @return bool * @return bool
*/ */
@@ -468,7 +467,6 @@ 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
*/ */

View File

@@ -28,7 +28,6 @@ interface IDibiVariable
{ {
/** /**
* Format for SQL. * Format for SQL.
*
* @param DibiTranslator * @param DibiTranslator
* @param string optional modifier * @param string optional modifier
* @return string SQL code * @return string SQL code
@@ -116,8 +115,7 @@ interface IDibiDriver
{ {
/** /**
* Internal: Connects to a database. * Connects to a database.
*
* @param array * @param array
* @return void * @return void
* @throws DibiException * @throws DibiException
@@ -127,8 +125,7 @@ interface IDibiDriver
/** /**
* Internal: Disconnects from a database. * Disconnects from a database.
*
* @return void * @return void
* @throws DibiException * @throws DibiException
*/ */
@@ -138,7 +135,6 @@ interface IDibiDriver
/** /**
* Internal: Executes the SQL query. * Internal: Executes the SQL query.
*
* @param string SQL statement. * @param string SQL statement.
* @return IDibiDriver|NULL * @return IDibiDriver|NULL
* @throws DibiDriverException * @throws DibiDriverException
@@ -149,7 +145,6 @@ interface IDibiDriver
/** /**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error * @return int|FALSE number of rows or FALSE on error
*/ */
function affectedRows(); function affectedRows();
@@ -158,7 +153,6 @@ interface IDibiDriver
/** /**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure * @return int|FALSE int on success or FALSE on failure
*/ */
function insertId($sequence); function insertId($sequence);
@@ -194,7 +188,6 @@ interface IDibiDriver
/** /**
* Returns the connection resource. * Returns the connection resource.
*
* @return mixed * @return mixed
*/ */
function getResource(); function getResource();
@@ -207,7 +200,6 @@ interface IDibiDriver
/** /**
* Encodes data for use in an SQL statement. * Encodes data for use in an SQL statement.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
* @return string encoded value * @return string encoded value
@@ -219,7 +211,6 @@ interface IDibiDriver
/** /**
* Decodes data from result set. * Decodes data from result set.
*
* @param string value * @param string value
* @param string type (dibi::FIELD_BINARY) * @param string type (dibi::FIELD_BINARY)
* @return string decoded value * @return string decoded value
@@ -231,7 +222,6 @@ interface IDibiDriver
/** /**
* Injects LIMIT/OFFSET to the SQL query. * Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
@@ -247,7 +237,6 @@ interface IDibiDriver
/** /**
* Returns the number of rows in a result set. * Returns the number of rows in a result set.
*
* @return int * @return int
*/ */
function rowCount(); function rowCount();
@@ -256,7 +245,6 @@ interface IDibiDriver
/** /**
* Moves cursor position without fetching row. * Moves cursor position without fetching row.
*
* @param int the 0-based cursor pos to seek to * @param int the 0-based cursor pos to seek to
* @return boolean TRUE on success, FALSE if unable to seek to specified record * @return boolean TRUE on success, FALSE if unable to seek to specified record
* @throws DibiException * @throws DibiException
@@ -267,10 +255,9 @@ interface IDibiDriver
/** /**
* Fetches the row at current position and moves the internal cursor to the next position. * Fetches the row at current position and moves the internal cursor to the next position.
* internal usage only
*
* @param bool TRUE for associative array, FALSE for numeric * @param bool TRUE for associative array, FALSE for numeric
* @return array array on success, nonarray if no next record * @return array array on success, nonarray if no next record
* @internal
*/ */
function fetch($type); function fetch($type);
@@ -278,7 +265,6 @@ interface IDibiDriver
/** /**
* Frees the resources allocated for this result set. * Frees the resources allocated for this result set.
*
* @param resource result set resource * @param resource result set resource
* @return void * @return void
*/ */
@@ -288,7 +274,6 @@ interface IDibiDriver
/** /**
* Returns metadata for all columns in a result set. * Returns metadata for all columns in a result set.
*
* @return array * @return array
* @throws DibiException * @throws DibiException
*/ */
@@ -298,7 +283,6 @@ interface IDibiDriver
/** /**
* Returns the result set resource. * Returns the result set resource.
*
* @return mixed * @return mixed
*/ */
function getResultResource(); function getResultResource();