diff --git a/dibi/dibi.php b/dibi/dibi.php index a8597210..2b342d6b 100644 --- a/dibi/dibi.php +++ b/dibi/dibi.php @@ -66,7 +66,7 @@ class DibiPcreException extends Exception { require_once dirname(__FILE__) . '/libs/interfaces.php'; require_once dirname(__FILE__) . '/libs/DibiDateTime.php'; require_once dirname(__FILE__) . '/libs/DibiObject.php'; -require_once dirname(__FILE__) . '/libs/DibiLazyStorage.php'; +require_once dirname(__FILE__) . '/libs/DibiHashMap.php'; require_once dirname(__FILE__) . '/libs/DibiException.php'; require_once dirname(__FILE__) . '/libs/DibiConnection.php'; require_once dirname(__FILE__) . '/libs/DibiResult.php'; @@ -612,7 +612,7 @@ class dibi /** * Returns substitution hashmap - Monostate for DibiConnection::getSubstitutes(). - * @return DibiLazyStorage + * @return DibiHashMap */ public static function getSubstitutes() { diff --git a/dibi/libs/DibiConnection.php b/dibi/libs/DibiConnection.php index 86c46174..a2e2fb1f 100644 --- a/dibi/libs/DibiConnection.php +++ b/dibi/libs/DibiConnection.php @@ -42,7 +42,7 @@ class DibiConnection extends DibiObject /** @var bool Is connected? */ private $connected = FALSE; - /** @var DibiLazyStorage Substitutes for identifiers */ + /** @var DibiHashMap Substitutes for identifiers */ private $substitutes; @@ -122,7 +122,7 @@ class DibiConnection extends DibiObject $this->setProfiler(new $class($profilerCfg)); } - $this->substitutes = new DibiLazyStorage(create_function('$expr', 'return ":$expr:";')); + $this->substitutes = new DibiHashMap(create_function('$expr', 'return ":$expr:";')); if (!empty($config['substitutes'])) { foreach ($config['substitutes'] as $key => $value) { $this->substitutes->$key = $value; @@ -582,7 +582,7 @@ class DibiConnection extends DibiObject /** * Returns substitution hashmap. - * @return DibiLazyStorage + * @return DibiHashMap */ public function getSubstitutes() { diff --git a/dibi/libs/DibiDatabaseInfo.php b/dibi/libs/DibiDatabaseInfo.php index 3d1a300a..b5fae136 100644 --- a/dibi/libs/DibiDatabaseInfo.php +++ b/dibi/libs/DibiDatabaseInfo.php @@ -532,7 +532,7 @@ class DibiColumnInfo extends DibiObject public function getType() { if (self::$types === NULL) { - self::$types = new DibiLazyStorage(array(__CLASS__, 'detectType')); + self::$types = new DibiHashMap(array(__CLASS__, 'detectType')); } return self::$types->{$this->info['nativetype']}; } diff --git a/dibi/libs/DibiFluent.php b/dibi/libs/DibiFluent.php index cd3d638c..c9e360fb 100644 --- a/dibi/libs/DibiFluent.php +++ b/dibi/libs/DibiFluent.php @@ -94,7 +94,7 @@ class DibiFluent extends DibiObject implements IDataSource /** @var array */ private $cursor; - /** @var DibiLazyStorage normalized clauses */ + /** @var DibiHashMap normalized clauses */ private static $normalizer; @@ -107,7 +107,7 @@ class DibiFluent extends DibiObject implements IDataSource $this->connection = $connection; if (self::$normalizer === NULL) { - self::$normalizer = new DibiLazyStorage(array(__CLASS__, '_formatClause')); + self::$normalizer = new DibiHashMap(array(__CLASS__, '_formatClause')); } } diff --git a/dibi/libs/DibiLazyStorage.php b/dibi/libs/DibiHashMap.php similarity index 93% rename from dibi/libs/DibiLazyStorage.php rename to dibi/libs/DibiHashMap.php index 516adbb1..0a0233c6 100644 --- a/dibi/libs/DibiLazyStorage.php +++ b/dibi/libs/DibiHashMap.php @@ -18,7 +18,7 @@ * @author David Grudl * @internal */ -abstract class DibiLazyStorageBase +abstract class DibiHashMapBase { private $callback; @@ -50,7 +50,7 @@ abstract class DibiLazyStorageBase -final class DibiLazyStorage extends DibiLazyStorageBase +final class DibiHashMap extends DibiHashMapBase { public function __set($nm, $val) diff --git a/dibi/libs/DibiTranslator.php b/dibi/libs/DibiTranslator.php index 60f3f848..984b44a7 100644 --- a/dibi/libs/DibiTranslator.php +++ b/dibi/libs/DibiTranslator.php @@ -49,7 +49,7 @@ final class DibiTranslator extends DibiObject /** @var int */ private $offset; - /** @var DibiLazyStorage */ + /** @var DibiHashMap */ private $identifiers; @@ -69,7 +69,7 @@ final class DibiTranslator extends DibiObject */ public function translate(array $args) { - $this->identifiers = new DibiLazyStorage(array($this, 'delimite')); + $this->identifiers = new DibiHashMap(array($this, 'delimite')); $this->driver = $this->connection->getDriver(); $args = array_values($args);