diff --git a/dibi/Nette/IDebuggable.php b/dibi/Nette/IDebuggable.php index c1013dbd..650c4eff 100644 --- a/dibi/Nette/IDebuggable.php +++ b/dibi/Nette/IDebuggable.php @@ -3,7 +3,7 @@ /** * Nette Framework * - * Copyright (c) 2004, 2008 David Grudl (http://www.davidgrudl.com) + * Copyright (c) 2004, 2008 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. @@ -17,13 +17,14 @@ * @package Nette */ -// namespace Nette; +/*namespace Nette;*/ + /** * Custom output for Nette::Debug. */ -interface Nette_IDebuggable +interface IDebuggable { /** diff --git a/dibi/Nette/Object.php b/dibi/Nette/Object.php index 7f2f3896..6bd98b2d 100644 --- a/dibi/Nette/Object.php +++ b/dibi/Nette/Object.php @@ -3,7 +3,7 @@ /** * Nette Framework * - * Copyright (c) 2004, 2008 David Grudl (http://www.davidgrudl.com) + * Copyright (c) 2004, 2008 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. @@ -17,7 +17,7 @@ * @package Nette */ -// namespace Nette; +/*namespace Nette;*/ /** @@ -61,7 +61,7 @@ * @package Nette * @version $Revision$ $Date$ */ -abstract class Nette_Object +abstract class Object { /** @@ -94,12 +94,12 @@ abstract class Nette_Object * @param string method name * @param array arguments * @return mixed - * @throws MemberAccessException + * @throws ::MemberAccessException */ protected function __call($name, $args) { if ($name === '') { - throw new MemberAccessException("Call to method without name."); + throw new /*::*/MemberAccessException("Call to method without name."); } $class = get_class($this); @@ -125,7 +125,7 @@ abstract class Nette_Object } } while ($cl = get_parent_class($cl)); - throw new MemberAccessException("Call to undefined method $class::$name()."); + throw new /*::*/MemberAccessException("Call to undefined method $class::$name()."); } @@ -136,12 +136,12 @@ abstract class Nette_Object * @param string method name (in lower case!) * @param array arguments * @return mixed - * @throws MemberAccessException + * @throws ::MemberAccessException */ protected static function __callStatic($name, $args) { $class = get_called_class(); - throw new MemberAccessException("Call to undefined static method $class::$name()."); + throw new /*::*/MemberAccessException("Call to undefined static method $class::$name()."); } @@ -151,12 +151,12 @@ abstract class Nette_Object * * @param string property name * @return mixed property value - * @throws MemberAccessException if the property is not defined. + * @throws ::MemberAccessException if the property is not defined. */ protected function &__get($name) { if ($name === '') { - throw new MemberAccessException("Cannot read an property without name."); + throw new /*::*/MemberAccessException("Cannot read an property without name."); } // property getter support @@ -164,13 +164,13 @@ abstract class Nette_Object $m = 'get' . $name; if (self::hasAccessor($class, $m)) { // ampersands: - // - using &__get() because declaration should be forward compatible (e.g. with Web::Html) + // - using &__get() because declaration should be forward compatible (e.g. with Nette::Web::Html) // - not using &$this->$m because user could bypass property setter by: $x = & $obj->property; $x = 'new value'; $val = $this->$m(); return $val; } else { - throw new MemberAccessException("Cannot read an undeclared property $class::\$$name."); + throw new /*::*/MemberAccessException("Cannot read an undeclared property $class::\$$name."); } } @@ -182,12 +182,12 @@ abstract class Nette_Object * @param string property name * @param mixed property value * @return void - * @throws MemberAccessException if the property is not defined or is read-only + * @throws ::MemberAccessException if the property is not defined or is read-only */ protected function __set($name, $value) { if ($name === '') { - throw new MemberAccessException('Cannot assign to an property without name.'); + throw new /*::*/MemberAccessException('Cannot assign to an property without name.'); } // property setter support @@ -198,11 +198,11 @@ abstract class Nette_Object $this->$m($value); } else { - throw new MemberAccessException("Cannot assign to a read-only property $class::\$$name."); + throw new /*::*/MemberAccessException("Cannot assign to a read-only property $class::\$$name."); } } else { - throw new MemberAccessException("Cannot assign to an undeclared property $class::\$$name."); + throw new /*::*/MemberAccessException("Cannot assign to an undeclared property $class::\$$name."); } } @@ -226,12 +226,12 @@ abstract class Nette_Object * * @param string property name * @return void - * @throws MemberAccessException + * @throws ::MemberAccessException */ protected function __unset($name) { $class = get_class($this); - throw new MemberAccessException("Cannot unset an property $class::\$$name."); + throw new /*::*/MemberAccessException("Cannot unset an property $class::\$$name."); } diff --git a/dibi/Nette/exceptions.php b/dibi/Nette/exceptions.php index c284c0f7..8f96c288 100644 --- a/dibi/Nette/exceptions.php +++ b/dibi/Nette/exceptions.php @@ -3,7 +3,7 @@ /** * Nette Framework * - * Copyright (c) 2004, 2008 David Grudl (http://www.davidgrudl.com) + * Copyright (c) 2004, 2008 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. @@ -17,7 +17,7 @@ * @package Nette */ -// no namespace; +/*no namespace*/ @@ -108,12 +108,3 @@ class FileNotFoundException extends IOException class DirectoryNotFoundException extends IOException { } - - - -/** - * User attempt to terminate the current script. - */ -class AbortException extends RuntimeException -{ -} diff --git a/dibi/dibi.php b/dibi/dibi.php index db425436..b98ef0d4 100644 --- a/dibi/dibi.php +++ b/dibi/dibi.php @@ -32,8 +32,8 @@ if (version_compare(PHP_VERSION, '5.1.0', '<')) { // nette libraries if (!class_exists('NotImplementedException', FALSE)) { require_once dirname(__FILE__) . '/Nette/exceptions.php'; } -if (!class_exists('Nette_Object', FALSE)) { require_once dirname(__FILE__) . '/Nette/Object.php'; } -if (!interface_exists('Nette_IDebuggable', FALSE)) { require_once dirname(__FILE__) . '/Nette/IDebuggable.php'; } +if (!class_exists(/*Nette::*/'Object', FALSE)) { require_once dirname(__FILE__) . '/Nette/Object.php'; } +if (!interface_exists(/*Nette::*/'IDebuggable', FALSE)) { require_once dirname(__FILE__) . '/Nette/IDebuggable.php'; } // dibi libraries require_once dirname(__FILE__) . '/libs/interfaces.php'; @@ -168,11 +168,11 @@ class dibi */ public static function connect($config = array(), $name = 0) { - if (class_exists('Nette_Debug', FALSE) && Nette_Debug::isEnabled()) { - Nette_Debug::addColophon(array(__CLASS__, 'getColophon')); + if (class_exists(/*Nette::*/'Debug', FALSE) && /*Nette::*/Debug::isEnabled()) { + /*Nette::*/Debug::addColophon(array(__CLASS__, 'getColophon')); } - if (is_array($config) || $config instanceof Nette_Collections_IMap) { + if (is_array($config) || $config instanceof /*Nette::Collections::*/IMap) { $config['name'] = $name; } else { $config .= '&name=' . urlencode($name); diff --git a/dibi/drivers/mssql.php b/dibi/drivers/mssql.php index 595c2ffc..b43382a5 100644 --- a/dibi/drivers/mssql.php +++ b/dibi/drivers/mssql.php @@ -34,7 +34,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiMsSqlDriver extends Nette_Object implements IDibiDriver +class DibiMsSqlDriver extends /*Nette::*/Object implements IDibiDriver { /** diff --git a/dibi/drivers/mysql.php b/dibi/drivers/mysql.php index 8dd0e7f7..050ae7cc 100644 --- a/dibi/drivers/mysql.php +++ b/dibi/drivers/mysql.php @@ -40,7 +40,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiMySqlDriver extends Nette_Object implements IDibiDriver +class DibiMySqlDriver extends /*Nette::*/Object implements IDibiDriver { /** diff --git a/dibi/drivers/mysqli.php b/dibi/drivers/mysqli.php index 36c0962c..d7af2089 100644 --- a/dibi/drivers/mysqli.php +++ b/dibi/drivers/mysqli.php @@ -40,7 +40,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiMySqliDriver extends Nette_Object implements IDibiDriver +class DibiMySqliDriver extends /*Nette::*/Object implements IDibiDriver { /** diff --git a/dibi/drivers/odbc.php b/dibi/drivers/odbc.php index 04ea55be..6545416f 100644 --- a/dibi/drivers/odbc.php +++ b/dibi/drivers/odbc.php @@ -33,7 +33,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiOdbcDriver extends Nette_Object implements IDibiDriver +class DibiOdbcDriver extends /*Nette::*/Object implements IDibiDriver { /** diff --git a/dibi/drivers/oracle.php b/dibi/drivers/oracle.php index 06ba6247..12c29e61 100644 --- a/dibi/drivers/oracle.php +++ b/dibi/drivers/oracle.php @@ -33,7 +33,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiOracleDriver extends Nette_Object implements IDibiDriver +class DibiOracleDriver extends /*Nette::*/Object implements IDibiDriver { /** diff --git a/dibi/drivers/pdo.php b/dibi/drivers/pdo.php index e286e055..7cd65cca 100644 --- a/dibi/drivers/pdo.php +++ b/dibi/drivers/pdo.php @@ -33,7 +33,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiPdoDriver extends Nette_Object implements IDibiDriver +class DibiPdoDriver extends /*Nette::*/Object implements IDibiDriver { /** diff --git a/dibi/drivers/postgre.php b/dibi/drivers/postgre.php index e04c612c..491d5ae7 100644 --- a/dibi/drivers/postgre.php +++ b/dibi/drivers/postgre.php @@ -34,7 +34,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiPostgreDriver extends Nette_Object implements IDibiDriver +class DibiPostgreDriver extends /*Nette::*/Object implements IDibiDriver { /** diff --git a/dibi/drivers/sqlite.php b/dibi/drivers/sqlite.php index f14d1527..7c329a46 100644 --- a/dibi/drivers/sqlite.php +++ b/dibi/drivers/sqlite.php @@ -34,7 +34,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiSqliteDriver extends Nette_Object implements IDibiDriver +class DibiSqliteDriver extends /*Nette::*/Object implements IDibiDriver { /** diff --git a/dibi/libs/DibiConnection.php b/dibi/libs/DibiConnection.php index 1a78b93c..21404666 100644 --- a/dibi/libs/DibiConnection.php +++ b/dibi/libs/DibiConnection.php @@ -27,7 +27,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiConnection extends Nette_Object +class DibiConnection extends /*Nette::*/Object { /** * Current connection configuration. @@ -58,7 +58,7 @@ class DibiConnection extends Nette_Object /** * Creates object and (optionally) connects to a database. * - * @param array|string|Nette_Collections_IMap connection parameters + * @param array|string|Nette::Collections::IMap connection parameters * @throws DibiException */ public function __construct($config) @@ -67,7 +67,7 @@ class DibiConnection extends Nette_Object if (is_string($config)) { parse_str($config, $config); - } elseif ($config instanceof Nette_Collections_IMap) { + } elseif ($config instanceof /*Nette::Collections::*/IMap) { $config = $config->toArray(); } diff --git a/dibi/libs/DibiDataSource.php b/dibi/libs/DibiDataSource.php index a325f11f..59676877 100644 --- a/dibi/libs/DibiDataSource.php +++ b/dibi/libs/DibiDataSource.php @@ -27,7 +27,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiDataSource extends Nette_Object implements IDataSource +class DibiDataSource extends /*Nette::*/Object implements IDataSource { /** @var DibiConnection */ private $connection; diff --git a/dibi/libs/DibiException.php b/dibi/libs/DibiException.php index a3c494e6..66095138 100644 --- a/dibi/libs/DibiException.php +++ b/dibi/libs/DibiException.php @@ -42,7 +42,7 @@ class DibiException extends Exception * @package dibi * @version $Revision$ $Date$ */ -class DibiDriverException extends DibiException implements Nette_IDebuggable +class DibiDriverException extends DibiException implements /*Nette::*/IDebuggable { /** @var string */ private static $errorMsg; @@ -87,7 +87,7 @@ class DibiDriverException extends DibiException implements Nette_IDebuggable - /********************* interface Nette_IDebuggable ****************d*g**/ + /********************* interface Nette::IDebuggable ****************d*g**/ /** diff --git a/dibi/libs/DibiLogger.php b/dibi/libs/DibiLogger.php index b4eaae5d..f6ae6f0f 100644 --- a/dibi/libs/DibiLogger.php +++ b/dibi/libs/DibiLogger.php @@ -27,7 +27,7 @@ * @package dibi * @version $Revision$ $Date$ */ -final class DibiLogger extends Nette_Object +final class DibiLogger extends /*Nette::*/Object { /** @var string Name of the file where SQL errors should be logged */ private $file; diff --git a/dibi/libs/DibiResult.php b/dibi/libs/DibiResult.php index 5afd76d9..4281ac67 100644 --- a/dibi/libs/DibiResult.php +++ b/dibi/libs/DibiResult.php @@ -41,7 +41,7 @@ * @package dibi * @version $Revision$ $Date$ */ -class DibiResult extends Nette_Object implements IDataSource +class DibiResult extends /*Nette::*/Object implements IDataSource { /** * IDibiDriver. diff --git a/dibi/libs/DibiTable.php b/dibi/libs/DibiTable.php index 19ed24d5..10f7fe30 100644 --- a/dibi/libs/DibiTable.php +++ b/dibi/libs/DibiTable.php @@ -26,7 +26,7 @@ * @package dibi * @version $Revision$ $Date$ */ -abstract class DibiTable extends Nette_Object +abstract class DibiTable extends /*Nette::*/Object { /** @var string primary key mask */ public static $primaryMask = 'id'; diff --git a/dibi/libs/DibiTranslator.php b/dibi/libs/DibiTranslator.php index ce76f474..f0ba1d49 100644 --- a/dibi/libs/DibiTranslator.php +++ b/dibi/libs/DibiTranslator.php @@ -27,7 +27,7 @@ * @package dibi * @version $Revision$ $Date$ */ -final class DibiTranslator extends Nette_Object +final class DibiTranslator extends /*Nette::*/Object { /** @var string */ public $sql; diff --git a/dibi/libs/DibiVariable.php b/dibi/libs/DibiVariable.php index 469d9756..4cef63b1 100644 --- a/dibi/libs/DibiVariable.php +++ b/dibi/libs/DibiVariable.php @@ -23,7 +23,7 @@ * Default implemenation of IDibiVariable. * @package dibi */ -class DibiVariable extends Nette_Object implements IDibiVariable +class DibiVariable extends /*Nette::*/Object implements IDibiVariable { /** @var mixed */ public $value; diff --git a/examples/nette-debug.php b/examples/nette-debug.php index e50a515e..3c998ff7 100644 --- a/examples/nette-debug.php +++ b/examples/nette-debug.php @@ -5,7 +5,7 @@ require_once '../dibi/dibi.php'; require_once 'Nette/Debug.php'; -Nette_Debug::enable(); +Debug::enable(); dibi::connect(array(