From e5a1877ed9d34d5a096eb7441e2d341c478f9e4a Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 31 Dec 2008 00:13:40 +0000 Subject: [PATCH] - year 2008 -> 2009 --- dibi/Nette/IDebuggable.php | 6 +- dibi/dibi.php | 6 +- dibi/drivers/mssql.php | 6 +- dibi/drivers/mysql.php | 6 +- dibi/drivers/mysqli.php | 6 +- dibi/drivers/odbc.php | 6 +- dibi/drivers/oracle.php | 6 +- dibi/drivers/pdo.php | 6 +- dibi/drivers/postgre.php | 6 +- dibi/drivers/sqlite.php | 6 +- dibi/libs/DibiConnection.php | 6 +- dibi/libs/DibiDataSource.php | 6 +- dibi/libs/DibiDatabaseInfo.php | 14 ++--- dibi/libs/DibiException.php | 8 +-- dibi/libs/DibiFluent.php | 6 +- dibi/libs/DibiObject.php | 6 +- dibi/libs/DibiProfiler.php | 6 +- dibi/libs/DibiResult.php | 8 +-- dibi/libs/DibiTableX.php | 6 +- dibi/libs/DibiTranslator.php | 6 +- dibi/libs/DibiVariable.php | 4 +- dibi/libs/interfaces.php | 6 +- examples/Nette/Debug.php | 102 ++++++++++++++++++++------------- readme.txt | 2 +- 24 files changed, 133 insertions(+), 113 deletions(-) diff --git a/dibi/Nette/IDebuggable.php b/dibi/Nette/IDebuggable.php index 2cfc2803..bba1b183 100644 --- a/dibi/Nette/IDebuggable.php +++ b/dibi/Nette/IDebuggable.php @@ -3,14 +3,14 @@ /** * Nette Framework * - * Copyright (c) 2004, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "Nette license" that is bundled * with this package in the file license.txt. * * For more information please see http://nettephp.com * - * @copyright Copyright (c) 2004, 2008 David Grudl + * @copyright Copyright (c) 2004, 2009 David Grudl * @license http://nettephp.com/license Nette license * @link http://nettephp.com * @category Nette @@ -25,7 +25,7 @@ * Custom output for Nette::Debug. * * @author David Grudl - * @copyright Copyright (c) 2004, 2008 David Grudl + * @copyright Copyright (c) 2004, 2009 David Grudl * @package Nette */ interface IDebuggable diff --git a/dibi/dibi.php b/dibi/dibi.php index 20b21444..ed78c64e 100644 --- a/dibi/dibi.php +++ b/dibi/dibi.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -85,7 +85,7 @@ require_once dirname(__FILE__) . '/libs/DibiProfiler.php'; * store connections info. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class dibi diff --git a/dibi/drivers/mssql.php b/dibi/drivers/mssql.php index 8388f8fc..fb9a6a65 100644 --- a/dibi/drivers/mssql.php +++ b/dibi/drivers/mssql.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -31,7 +31,7 @@ * - 'lazy' - if TRUE, connection will be established only when required * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiMsSqlDriver extends DibiObject implements IDibiDriver diff --git a/dibi/drivers/mysql.php b/dibi/drivers/mysql.php index da7bb194..76d7ceb0 100644 --- a/dibi/drivers/mysql.php +++ b/dibi/drivers/mysql.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -37,7 +37,7 @@ * - 'lazy' - if TRUE, connection will be established only when required * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiMySqlDriver extends DibiObject implements IDibiDriver diff --git a/dibi/drivers/mysqli.php b/dibi/drivers/mysqli.php index fcf05813..f1e2fd8a 100644 --- a/dibi/drivers/mysqli.php +++ b/dibi/drivers/mysqli.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -37,7 +37,7 @@ * - 'lazy' - if TRUE, connection will be established only when required * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiMySqliDriver extends DibiObject implements IDibiDriver diff --git a/dibi/drivers/odbc.php b/dibi/drivers/odbc.php index fa5c6f18..36c7704a 100644 --- a/dibi/drivers/odbc.php +++ b/dibi/drivers/odbc.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -30,7 +30,7 @@ * - 'lazy' - if TRUE, connection will be established only when required * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiOdbcDriver extends DibiObject implements IDibiDriver diff --git a/dibi/drivers/oracle.php b/dibi/drivers/oracle.php index 65add54f..2d9fe586 100644 --- a/dibi/drivers/oracle.php +++ b/dibi/drivers/oracle.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -30,7 +30,7 @@ * - 'lazy' - if TRUE, connection will be established only when required * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiOracleDriver extends DibiObject implements IDibiDriver diff --git a/dibi/drivers/pdo.php b/dibi/drivers/pdo.php index 6ff8d3c2..b4e9bbe8 100644 --- a/dibi/drivers/pdo.php +++ b/dibi/drivers/pdo.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -31,7 +31,7 @@ * - 'lazy' - if TRUE, connection will be established only when required * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiPdoDriver extends DibiObject implements IDibiDriver diff --git a/dibi/drivers/postgre.php b/dibi/drivers/postgre.php index 591977ed..0f7b2b3d 100644 --- a/dibi/drivers/postgre.php +++ b/dibi/drivers/postgre.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -31,7 +31,7 @@ * - 'lazy' - if TRUE, connection will be established only when required * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiPostgreDriver extends DibiObject implements IDibiDriver diff --git a/dibi/drivers/sqlite.php b/dibi/drivers/sqlite.php index 6a927e32..61359947 100644 --- a/dibi/drivers/sqlite.php +++ b/dibi/drivers/sqlite.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -31,7 +31,7 @@ * - 'formatDateTime' - how to format datetime in SQL (@see date) * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiSqliteDriver extends DibiObject implements IDibiDriver diff --git a/dibi/libs/DibiConnection.php b/dibi/libs/DibiConnection.php index b1068347..99362a23 100644 --- a/dibi/libs/DibiConnection.php +++ b/dibi/libs/DibiConnection.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -24,7 +24,7 @@ * dibi connection. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiConnection extends DibiObject diff --git a/dibi/libs/DibiDataSource.php b/dibi/libs/DibiDataSource.php index 58cf79bb..20ad30e6 100644 --- a/dibi/libs/DibiDataSource.php +++ b/dibi/libs/DibiDataSource.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -24,7 +24,7 @@ * Default implementation of IDataSource for dibi. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiDataSource extends DibiObject implements IDataSource diff --git a/dibi/libs/DibiDatabaseInfo.php b/dibi/libs/DibiDatabaseInfo.php index 9728df42..caf62fad 100644 --- a/dibi/libs/DibiDatabaseInfo.php +++ b/dibi/libs/DibiDatabaseInfo.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -24,7 +24,7 @@ * Reflection metadata class for a database. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiDatabaseInfo extends DibiObject @@ -136,7 +136,7 @@ class DibiDatabaseInfo extends DibiObject * Reflection metadata class for a database table. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiTableInfo extends DibiObject @@ -336,7 +336,7 @@ class DibiTableInfo extends DibiObject * Reflection metadata class for a table column. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiColumnInfo extends DibiObject @@ -505,7 +505,7 @@ class DibiColumnInfo extends DibiObject * Reflection metadata class for a foreign key. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi * @todo */ @@ -554,7 +554,7 @@ class DibiForeignKeyInfo extends DibiObject * Reflection metadata class for a index or primary key * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiIndexInfo extends DibiObject diff --git a/dibi/libs/DibiException.php b/dibi/libs/DibiException.php index b87bc8d6..70524b4b 100644 --- a/dibi/libs/DibiException.php +++ b/dibi/libs/DibiException.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -24,7 +24,7 @@ * dibi common exception. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiException extends Exception @@ -38,7 +38,7 @@ class DibiException extends Exception * database server exception. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiDriverException extends DibiException implements /*Nette\*/IDebuggable diff --git a/dibi/libs/DibiFluent.php b/dibi/libs/DibiFluent.php index 738cc364..fd6c2c87 100644 --- a/dibi/libs/DibiFluent.php +++ b/dibi/libs/DibiFluent.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -24,7 +24,7 @@ * dibi SQL builder via fluent interfaces. EXPERIMENTAL! * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiFluent extends DibiObject diff --git a/dibi/libs/DibiObject.php b/dibi/libs/DibiObject.php index 1ae75cdc..ab814896 100644 --- a/dibi/libs/DibiObject.php +++ b/dibi/libs/DibiObject.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -59,7 +59,7 @@ * * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ abstract class DibiObject diff --git a/dibi/libs/DibiProfiler.php b/dibi/libs/DibiProfiler.php index 0de39caa..70cbe158 100644 --- a/dibi/libs/DibiProfiler.php +++ b/dibi/libs/DibiProfiler.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -24,7 +24,7 @@ * dibi basic logger & profiler (experimental). * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiProfiler extends DibiObject implements IDibiProfiler diff --git a/dibi/libs/DibiResult.php b/dibi/libs/DibiResult.php index ba96332a..d8077f6b 100644 --- a/dibi/libs/DibiResult.php +++ b/dibi/libs/DibiResult.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -37,7 +37,7 @@ * * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiResult extends DibiObject implements IDataSource @@ -647,7 +647,7 @@ class DibiResult extends DibiObject implements IDataSource * dibi result-set row * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ class DibiRow extends ArrayObject diff --git a/dibi/libs/DibiTableX.php b/dibi/libs/DibiTableX.php index fade26ca..ce441926 100644 --- a/dibi/libs/DibiTableX.php +++ b/dibi/libs/DibiTableX.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -23,7 +23,7 @@ * Experimental object-oriented interface to database tables. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ abstract class DibiTableX extends DibiObject diff --git a/dibi/libs/DibiTranslator.php b/dibi/libs/DibiTranslator.php index 8429fe6d..6a72a398 100644 --- a/dibi/libs/DibiTranslator.php +++ b/dibi/libs/DibiTranslator.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -24,7 +24,7 @@ * dibi SQL translator. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ final class DibiTranslator extends DibiObject diff --git a/dibi/libs/DibiVariable.php b/dibi/libs/DibiVariable.php index 5440be12..f11e26d0 100644 --- a/dibi/libs/DibiVariable.php +++ b/dibi/libs/DibiVariable.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi diff --git a/dibi/libs/interfaces.php b/dibi/libs/interfaces.php index b834d89a..ab57163a 100644 --- a/dibi/libs/interfaces.php +++ b/dibi/libs/interfaces.php @@ -4,14 +4,14 @@ * dibi - tiny'n'smart database abstraction layer * ---------------------------------------------- * - * Copyright (c) 2005, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2005, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "dibi license" that is bundled * with this package in the file license.txt. * * For more information please see http://dibiphp.com * - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @license http://dibiphp.com/license dibi license * @link http://dibiphp.com * @package dibi @@ -108,7 +108,7 @@ interface IDibiProfiler * dibi driver interface. * * @author David Grudl - * @copyright Copyright (c) 2005, 2008 David Grudl + * @copyright Copyright (c) 2005, 2009 David Grudl * @package dibi */ interface IDibiDriver diff --git a/examples/Nette/Debug.php b/examples/Nette/Debug.php index c50ecde6..7bea667d 100644 --- a/examples/Nette/Debug.php +++ b/examples/Nette/Debug.php @@ -2,14 +2,14 @@ /** * Nette Framework * - * Copyright (c) 2004, 2008 David Grudl (http://davidgrudl.com) + * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com) * * This source file is subject to the "Nette license" that is bundled * with this package in the file license.txt. * * For more information please see http://nettephp.com * - * @copyright Copyright (c) 2004, 2008 David Grudl + * @copyright Copyright (c) 2004, 2009 David Grudl * @license http://nettephp.com/license Nette license * @link http://nettephp.com * @category Nette @@ -30,6 +30,9 @@ LogicException{}class NotSupportedException extends LogicException{}class +DeprecatedException +extends +NotSupportedException{}class MemberAccessException extends LogicException{}class @@ -46,11 +49,18 @@ FatalErrorException extends Exception{public function -__construct($message,$code,$severity,$file,$line,$context){parent::__construct($message,$code);$this->file=$file;$this->line=$line;$this->context=$context;}}final +__construct($message,$code,$severity,$file,$line,$context){parent::__construct($message,$code);$this->file=$file;$this->line=$line;$this->context=$context;}}if(!function_exists('json_encode')){function +json_encode($val){if(is_array($val)&&(!$val||array_keys($val)===range(0,count($val)-1))){return'['.implode(',',array_map('json_encode',$val)).']';}if(is_array($val)||is_object($val)){$tmp=array();foreach($val +as$k=>$v){$tmp[]=json_encode((string)$k).':'.json_encode($v);}return'{'.implode(',',$tmp).'}';}if(is_string($val)){$val=str_replace(array("\\","\x00"),array("\\\\","\\u0000"),$val);return'"'.addcslashes($val,"\x8\x9\xA\xC\xD/\"").'"';}if(is_int($val)||is_float($val)){return +rtrim(rtrim(number_format($val,5,'.',''),'0'),'.');}if(is_bool($val)){return$val?'true':'false';}return'null';}}if(version_compare(PHP_VERSION,'5.2.2','<')){function +fixCallback(&$callback){if(is_string($callback)&&strpos($callback,':')){$callback=explode('::',$callback);}if(is_array($callback)&&is_string($callback[0])&&$a=strrpos($callback[0],'\\')){$callback[0]=substr($callback[0],$a+1);}}}else{function +fixCallback(&$callback){if(is_string($callback)&&$a=strrpos($callback,'\\')){$callback=substr($callback,$a+1);}elseif(is_array($callback)&&is_string($callback[0])&&$a=strrpos($callback[0],'\\')){$callback[0]=substr($callback[0],$a+1);}}}if(version_compare(PHP_VERSION,'5.3.0','<')){function +fixNamespace(&$class){if($a=strrpos($class,'\\')){$class=substr($class,$a+1);}}}else{function +fixNamespace($foo){}}final class Framework{const VERSION='0.8';const -REVISION='107 released on 2008/10/29 20:40:23';final +REVISION='180 released on 2008/12/29 13:18:24';final public function __construct(){throw @@ -67,17 +77,20 @@ class Debug{public static$counters=array();public static$html;public +static$productionMode;public +static$consoleMode;public static$maxDepth=3;public -static$maxLen=150;private -static$enabled=FALSE;public -static$useFirebug;private +static$maxLen=150;public +static$keysToHide=array('password','passwd','pass','pwd','creditcard','credit card','cc','pin');private +static$enabled=FALSE;private +static$firebugDetected;private +static$ajaxDetected;private static$logFile;private static$logHandle;private static$sendEmails;private -static$emailHeaders=array('To'=>'','From'=>'noreply@%host%','X-Mailer'=>'Nette Framework','Subject'=>'PHP: An error occurred on the server %host%','Body'=>'[%date%]');public -static$mailer=array(__CLASS__,'sendEmail');public -static$emailProbability=0.01;public -static$keysToHide=array('password','passwd','pass','pwd','creditcard','credit card','cc','pin');private +static$emailHeaders=array('To'=>'','From'=>'noreply@%host%','X-Mailer'=>'Nette Framework','Subject'=>'PHP: An error occurred on the server %host%','Body'=>'[%date%] %message%');public +static$mailer=array(__CLASS__,'defaultMailer');public +static$emailProbability=0.01;private static$colophons=array(array(__CLASS__,'getDefaultColophons'));private static$keyFilter=array();public static$time;const @@ -92,7 +105,10 @@ new LogicException("Cannot instantiate static class ".get_class($this));}public static function -dump($var,$return=FALSE){self::$keyFilter=FALSE;$output="
".self::_dump($var,0)."
\n";if(!self::$html){$output=htmlspecialchars_decode(strip_tags($output),ENT_NOQUOTES);}if($return){return$output;}else{echo$output;return$var;}}private +init(){self::$time=microtime(TRUE);self::$consoleMode=PHP_SAPI==='cli';self::$productionMode=NULL;self::$firebugDetected=isset($_SERVER['HTTP_USER_AGENT'])&&strpos($_SERVER['HTTP_USER_AGENT'],'FirePHP/');self::$ajaxDetected=isset($_SERVER['HTTP_X_REQUESTED_WITH'])&&$_SERVER['HTTP_X_REQUESTED_WITH']==='XMLHttpRequest';}public +static +function +dump($var,$return=FALSE){if(!$return&&self::$productionMode){return$var;}$output="
".self::_dump($var,0)."
\n";if(self::$consoleMode){$output=htmlspecialchars_decode(strip_tags($output),ENT_NOQUOTES);}if($return){return$output;}else{echo$output;return$var;}}private static function _dump(&$var,$level){if(is_bool($var)){return"bool(".($var?'TRUE':'FALSE').")\n";}elseif($var===NULL){return"NULL\n";}elseif(is_int($var)){return"int($var)\n";}elseif(is_float($var)){return"float($var)\n";}elseif(is_string($var)){if(self::$maxLen&&strlen($var)>self::$maxLen){$s=htmlSpecialChars(substr($var,0,self::$maxLen),ENT_NOQUOTES).' ... ';}else{$s=htmlSpecialChars($var,ENT_NOQUOTES);}return"string(".strlen($var).") \"$s\"\n";}elseif(is_array($var)){$s="array(".count($var).") {\n";$space=str_repeat(' ',$level);static$marker;if($marker===NULL)$marker=uniqid("\x00",TRUE);if(isset($var[$marker])){$s.="$space *RECURSION*\n";}elseif($level&$v){if($k===$marker)continue;$s.="$space ".(is_int($k)?$k:"\"$k\"")." => as$k=>&$v){$m='';if($k[0]==="\x00"){$m=$k[1]==='*'?' protected':' private';$k=substr($k,strrpos($k,"\x00")+1);}$s.="$space \"$k\"$m => ";if(self::$keyFilter&&is_string($v)&&isset(self::$keyFilter[strtolower($k)])){$s.="string(?) *** hidden ***\n";}else{$s.=self::_dump($v,$level+1);}}array_pop($list);}else{$s.="$space ...\n";}return$s."$space}\n";}elseif(is_resource($var)){return"resource of type(".get_resource_type($var).")\n";}else{return"unknown type\n";}}public static function -timer(){static$time=0;$now=microtime(TRUE);$delta=$now-$time;$time=$now;return$delta;}public +timer($name=NULL){static$time=array();$now=microtime(TRUE);$delta=isset($time[$name])?$now-$time[$name]:0;$time[$name]=$now;return$delta;}public static function -enable($level=E_ALL,$logErrors=NULL,$sendEmails=FALSE){if(version_compare(PHP_VERSION,'5.2.1')===0){throw +enable($level=NULL,$logFile=NULL,$email=NULL){if(version_compare(PHP_VERSION,'5.2.1')===0){throw new -NotSupportedException(__METHOD__.' is not supported in PHP 5.2.1');}if($logErrors===NULL&&class_exists('Environment')){$logErrors=Environment::isLive();}if(self::$useFirebug===NULL){self::$useFirebug=function_exists('json_encode')&&!$logErrors&&isset($_SERVER['HTTP_USER_AGENT'])&&strpos($_SERVER['HTTP_USER_AGENT'],'FirePHP/');}if($level!==NULL){error_reporting($level);}if(function_exists('ini_set')){ini_set('display_startup_errors',!$logErrors);ini_set('display_errors',!$logErrors);ini_set('html_errors',self::$html);ini_set('log_errors',(bool)$logErrors);}elseif($logErrors){throw +NotSupportedException(__METHOD__.' is not supported in PHP 5.2.1');}error_reporting($level===NULL?E_ALL|E_STRICT:$level);if(self::$productionMode===NULL){if(class_exists('Environment')){self::$productionMode=Environment::isProduction();}elseif(isset($_SERVER['SERVER_ADDR'])){$oct=explode('.',$_SERVER['SERVER_ADDR']);self::$productionMode=$_SERVER['SERVER_ADDR']!=='::1'&&(count($oct)!==4||($oct[0]!=='10'&&$oct[0]!=='127'&&($oct[0]!=='172'||$oct[1]<16||$oct[1]>31)&&($oct[0]!=='169'||$oct[1]!=='254')&&($oct[0]!=='192'||$oct[1]!=='168')));}else{self::$productionMode=!self::$consoleMode;}}if(self::$productionMode&&$logFile!==FALSE){self::$logFile='php_error.log';if(class_exists('Environment')){if(is_string($logFile)){self::$logFile=Environment::expand($logFile);}else +try{self::$logFile=Environment::expand('%logDir%/php_error.log');}catch(InvalidStateException$e){}}elseif(is_string($logFile)){self::$logFile=$logFile;}ini_set('error_log',self::$logFile);}if(function_exists('ini_set')){ini_set('display_startup_errors',!self::$productionMode);ini_set('display_errors',!self::$productionMode);ini_set('html_errors',!self::$consoleMode);ini_set('log_errors',(bool)self::$logFile);}elseif(self::$productionMode){throw new -NotSupportedException('Function ini_set() is not enabled.');}if($logErrors){if(is_string($logErrors)){self::$logFile=strpos($logErrors,'%')===FALSE?$logErrors:Environment::expand($logErrors);}else{try{self::$logFile=Environment::expand('%logDir%/php_error.log');}catch(InvalidStateException$e){self::$logFile='php_error.log';}}ini_set('error_log',self::$logFile);}self::$sendEmails=$logErrors&&$sendEmails;if(self::$sendEmails){if(is_string($sendEmails)){self::$emailHeaders['To']=$sendEmails;}elseif(is_array($sendEmails)){self::$emailHeaders=$sendEmails+self::$emailHeaders;}if(mt_rand()/mt_getrandmax()1,E_CORE_ERROR=>1,E_COMPILE_ERROR=>1,E_USER_ERROR=>1,E_PARSE=>1,E_RECOVERABLE_ERROR=>1);if(isset($fatals[$severity])){throw new FatalErrorException($message,0,$severity,$file,$line,$context);}elseif(($severity&error_reporting())!==$severity){return -NULL;}elseif(self::$useFirebug&&!headers_sent()){$types=array(E_WARNING=>'Warning',E_USER_WARNING=>'Warning',E_NOTICE=>'Notice',E_USER_NOTICE=>'Notice',E_STRICT=>'Strict standards',E_DEPRECATED=>'Deprecated');$type=isset($types[$severity])?$types[$severity]:'Unknown error';$message=strip_tags($message);self::fireLog("$type: $message in $file on line $line",'WARN');return +NULL;}static$types=array(E_WARNING=>'Warning',E_USER_WARNING=>'Warning',E_NOTICE=>'Notice',E_USER_NOTICE=>'Notice',E_STRICT=>'Strict standards',E_DEPRECATED=>'Deprecated');$type=isset($types[$severity])?$types[$severity]:'Unknown error';if(self::$logFile){if(self::$sendEmails){self::sendEmail("$type: $message in $file on line $line");}return +FALSE;}elseif(!self::$productionMode&&self::$firebugDetected&&!headers_sent()){$message=strip_tags($message);self::fireLog("$type: $message in $file on line $line",'WARN');return NULL;}return FALSE;}public static function -paintBlueScreen(Exception$exception){$colophons=self::$colophons;function +processException(Exception$exception,$outputAllowed=FALSE){if(self::$logFile){error_log("PHP Fatal error: Uncaught $exception");$file=@strftime('%d-%b-%Y %H-%M-%S ',Debug::$time).strstr(number_format(Debug::$time,4,'~',''),'~');$file=dirname(self::$logFile)."/exception $file.html";self::$logHandle=@fopen($file,'x');if(self::$logHandle){ob_start(array(__CLASS__,'writeFile'),1);self::paintBlueScreen($exception);ob_end_flush();fclose(self::$logHandle);}if(self::$sendEmails){self::sendEmail((string)$exception);}}elseif(self::$productionMode){}elseif(self::$consoleMode){if($outputAllowed){echo"$exception\n";foreach(self::$colophons +as$callback){foreach((array)call_user_func($callback,'bluescreen')as$line)echo +strip_tags($line)."\n";}}}elseif(self::$firebugDetected&&self::$ajaxDetected&&!headers_sent()){self::fireLog($exception);}elseif($outputAllowed){while(ob_get_level()&&@ob_end_clean());self::paintBlueScreen($exception);}elseif(self::$firebugDetected&&!headers_sent()){self::fireLog($exception);}}public +static +function +paintBlueScreen(Exception$exception){$colophons=self::$colophons;if(!function_exists('_netteDebugPrintCode')){function _netteDebugPrintCode($file,$line,$count=15){if(function_exists('ini_set')){ini_set('highlight.comment','#999; font-style: italic');ini_set('highlight.default','#000');ini_set('highlight.html','#06b');ini_set('highlight.keyword','#d24; font-weight: bold');ini_set('highlight.string','#080');}$start=max(1,$line-floor($count/2));$source=explode("\n",@highlight_file($file,TRUE));echo$source[0];$source=explode('
',$source[1]);array_unshift($source,NULL);$i=$start;while(--$i>=1){if(preg_match('#.*(]*>)#',$source[$i],$m)){if($m[1]!=='')echo$m[1];break;}}$source=array_slice($source,$start,$count,TRUE);end($source);$numWidth=strlen((string)key($source));foreach($source as$n=>$s){$s=str_replace(array("\r","\n"),array('',''),$s);if($n===$line){printf("Line %{$numWidth}s: %s\n%s",$n,strip_tags($s),preg_replace('#[^>]*(<[^>]+>)[^<]*#','$1',$s));}else{printf("Line %{$numWidth}s: %s\n",$n,$s);}}echo'';}function _netteOpenPanel($name,$collaped){static$id;$id++;?> @@ -142,7 +163,7 @@ _netteClosePanel(){?> ';}?> +}}if(headers_sent()){echo'';}?> @@ -341,7 +362,8 @@ htmlSpecialChars(basename(dirname($row['file']))),'/',htmlSpecialChars(basena try{$r=isset($row['class'])?new ReflectionMethod($row['class'],$row['function']):new -ReflectionFunction($row['function']);$params=$r->getParameters();}catch(Exception$e){$params=array();}foreach($row['args']as$k=>$v){echo'',(isset($params[$k])?'$'.$params[$k]->name:"#$k"),'';echo'',self::safeDump($v,isset($params[$k])?$params[$k]->name:NULL),"\n";}?> +ReflectionFunction($row['function']);$params=$r->getParameters();}catch(Exception$e){$params=array();}foreach($row['args']as$k=>$v){echo'',(isset($params[$k])?'$'.$params[$k]->name:"#$k"),'';if(isset($params[$k])&&isset($keyFilter[strtolower($params[$k]->name)])){echo'*** hidden ***';}else{echo +Debug::dump($v,TRUE);}echo"\n";}?> @@ -376,7 +398,7 @@ IDebuggable):?> context -as$k=>$v){echo'$',htmlspecialchars($k),'',self::safeDump($v,$k),"\n";}?> +as$k=>$v){echo'$',htmlspecialchars($k),'';echo'',(isset($keyFilter[strtolower($k)])?'*** hidden ***':Debug::dump($v,TRUE)),"\n";}?> @@ -395,7 +417,7 @@ $list=get_defined_constants(TRUE);if(!empty($list['user'])):?> $v){echo'\n";}?> +foreach($list['user']as$k=>$v){echo'';echo'\n";}?>
',htmlspecialchars($k),'',self::safeDump($v,$k),"
',htmlspecialchars($k),'',(isset($keyFilter[strtolower($k)])?'*** hidden ***':Debug::dump($v,TRUE)),"
@@ -417,7 +439,7 @@ foreach(get_included_files()as$v){echo'',htmlspecialchars($v),"$v)echo'',htmlspecialchars($k),'',self::dump($v,TRUE),"\n";?> +as$k=>$v)echo'',htmlspecialchars($k),'',Debug::dump($v,TRUE),"\n";?> @@ -444,7 +466,7 @@ foreach(apache_request_headers()as$k=>$v)echo'',htmlspecialchars($k),' $v)echo'',htmlspecialchars($k),'',self::dump($v,TRUE),"\n";?> +foreach($GLOBALS[$name]as$k=>$v)echo'',htmlspecialchars($k),'',Debug::dump($v,TRUE),"\n";?> @@ -476,24 +498,21 @@ as$callback):?> $value){$header.="$key: $value\r\n";}$body=str_replace("\r\n","\n",$body);if(PHP_OS!='Linux')$body=str_replace("\n","\r\n",$body);if($to==='debug'){self::dump(array($to,$subject,$body,$header));}else{mail($to,$subject,$body,$header);}}private +defaultMailer($message){$host=isset($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:(isset($_SERVER['SERVER_NAME'])?$_SERVER['SERVER_NAME']:'');$headers=str_replace(array('%host%','%date%','%message%'),array($host,@date('Y-m-d H:i:s',Debug::$time),$message),self::$emailHeaders);$subject=$headers['Subject'];$to=$headers['To'];$body=$headers['Body'];unset($headers['Subject'],$headers['To'],$headers['Body']);$header='';foreach($headers +as$key=>$value){$header.="$key: $value\r\n";}$body=str_replace("\r\n","\n",$body);if(PHP_OS!='Linux')$body=str_replace("\n","\r\n",$body);mail($to,$subject,$body,$header);}public static function -safeDump($var,$key=NULL){self::$keyFilter=array_change_key_case(array_flip(self::$keysToHide),CASE_LOWER);if($key!==NULL&&isset(self::$keyFilter[strtolower($key)])){return'*** hidden ***';}return"
".self::_dump($var,0)."
\n";}public +enableProfiler(){if(!self::$productionMode){register_shutdown_function(array(__CLASS__,'paintProfiler'));}}public static function -enableProfiler(){register_shutdown_function(array(__CLASS__,'paintProfiler'));}public -static -function -paintProfiler(){$colophons=self::$colophons;if(self::$useFirebug){foreach(self::$colophons -as$callback){foreach((array)call_user_func($callback,'profiler')as$line)self::fireLog(strip_tags($line));}}if(!isset($_SERVER['HTTP_X_REQUESTED_WITH'])||$_SERVER['HTTP_X_REQUESTED_WITH']!=='XMLHttpRequest'){?> +paintProfiler(){$colophons=self::$colophons;if(self::$firebugDetected){self::fireLog('Nette profiler','GROUP_START');foreach(self::$colophons +as$callback){foreach((array)call_user_func($callback,'profiler')as$line)self::fireLog(strip_tags($line));}self::fireLog(null,'GROUP_END');}if(!self::$ajaxDetected){?>