r1228 - in trunk: core/Base doc

From: <voxusAT@ATshadanakar.org>
Date: Fri, 27 Jan 2006 07:06:12 +0300 (MSK)

Author: voxus
Date: 2006-01-27 07:06:11 +0300 (Fri, 27 Jan 2006)
New Revision: 1228

Added:
   trunk/core/Base/Singleton.class.php
Removed:
   trunk/core/Base/Singletone.class.php
Modified:
   trunk/doc/ChangeLog
Log:
* renaming..

Copied: trunk/core/Base/Singleton.class.php (from rev 1217, trunk/core/Base/Singletone.class.php)
===================================================================
--- trunk/core/Base/Singleton.class.php (rev 0)
+++ trunk/core/Base/Singleton.class.php 2006-01-27 04:06:11 UTC (rev 1228)
@@ -0,0 +1,68 @@
+<?php
+/***************************************************************************
+ * Copyright (C) 2004-2006 by Sveta Smirnova *
+ * svetaAT@ATmicrobecal.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+/* $Id$ */
+
+ /**
+ * Inheritable Singletone's pattern implementation.
+ *
+ * @ingroup Base
+ *
+ * @example singletone.php
+ **/
+ abstract class Singletone
+ {
+ protected function __construct() {/* you can't create me */}
+
+ final public static function getInstance(
+ $class = null, $args = null /* , ... */
+ )
+ {
+ static $instances = array();
+
+ if (null == $class) {
+ static $wrapper = null;
+
+ if (null == $wrapper)
+ $wrapper = new SingletoneInstance();
+
+ return $wrapper;
+ }
+
+ // for Singletone::getInstance('class_name', $arg1, ...) calling
+ if (2 < func_num_args()) {
+ $args = func_get_args();
+ array_shift($args);
+ }
+
+ if (!isset($instances[$class]))
+ return $instances[$class] =
+ $args
+ ? new $class($args)
+ : new $class();
+ else
+ return $instances[$class];
+ }
+
+ final private function __clone() {/* do not clone me */}
+ }
+
+ /**
+ * @ingroup Base
+ **/
+ final class SingletoneInstance extends Singletone
+ {
+ public function __call($class, $args = null)
+ {
+ return Singletone::getInstance($class, $args);
+ }
+ }
+?>
\ No newline at end of file

Deleted: trunk/core/Base/Singletone.class.php
===================================================================
--- trunk/core/Base/Singletone.class.php 2006-01-27 02:25:11 UTC (rev 1227)
+++ trunk/core/Base/Singletone.class.php 2006-01-27 04:06:11 UTC (rev 1228)
@@ -1,68 +0,0 @@
-<?php
-/***************************************************************************
- * Copyright (C) 2004-2006 by Sveta Smirnova *
- * svetaAT@ATmicrobecal.com *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-/* $Id$ */
-
- /**
- * Inheritable Singletone's pattern implementation.
- *
- * @ingroup Base
- *
- * @example singletone.php
- **/
- abstract class Singletone
- {
- protected function __construct() {/* you can't create me */}
-
- final public static function getInstance(
- $class = null, $args = null /* , ... */
- )
- {
- static $instances = array();
-
- if (null == $class) {
- static $wrapper = null;
-
- if (null == $wrapper)
- $wrapper = new SingletoneInstance();
-
- return $wrapper;
- }
-
- // for Singletone::getInstance('class_name', $arg1, ...) calling
- if (2 < func_num_args()) {
- $args = func_get_args();
- array_shift($args);
- }
-
- if (!isset($instances[$class]))
- return $instances[$class] =
- $args
- ? new $class($args)
- : new $class();
- else
- return $instances[$class];
- }
-
- final private function __clone() {/* do not clone me */}
- }
-
- /**
- * @ingroup Base
- **/
- final class SingletoneInstance extends Singletone
- {
- public function __call($class, $args = null)
- {
- return Singletone::getInstance($class, $args);
- }
- }
-?>
\ No newline at end of file

Modified: trunk/doc/ChangeLog
===================================================================
--- trunk/doc/ChangeLog 2006-01-27 02:25:11 UTC (rev 1227)
+++ trunk/doc/ChangeLog 2006-01-27 04:06:11 UTC (rev 1228)
@@ -2,6 +2,8 @@
 
 2006-01-27 Konstantin V. Arkhipov <voxusAT@ATshadanakar.org>
 
+ * core/Base/Singletone.class.php: renamed to Singleton.class.php.
+
         * core/OSQL/: implemented auto-increment columns generation for PgSQL,
         MySQL, IBase and SQLite.
 
Received on Fri Jan 27 2006 - 07:06:12 MSK

This archive was generated by hypermail 2.2.0 : Sat Oct 27 2007 - 19:45:41 MSD