1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-09 15:47:23 +02:00

dibi::$substs & fall-back provided via DibiLazyStorage

This commit is contained in:
David Grudl
2010-08-06 02:01:00 +02:00
parent 79735e96d1
commit 16dd0c7230
2 changed files with 13 additions and 18 deletions

View File

@@ -543,8 +543,7 @@ final class DibiTranslator extends DibiObject
if ($matches[8]) { // SQL identifier substitution
$m = substr($matches[8], 0, -1);
$m = isset(dibi::$substs[$m]) ? dibi::$substs[$m] : call_user_func(dibi::$substFallBack, $m);
return $matches[9] == '' ? $this->formatValue($m, FALSE) : $m . $matches[9]; // value or identifier
return $matches[9] == '' ? $this->formatValue(dibi::$substs->$m, FALSE) : dibi::$substs->$m . $matches[9]; // value or identifier
}
die('this should be never executed');
@@ -591,8 +590,7 @@ final class DibiTranslator extends DibiObject
*/
private static function subCb($m)
{
$m = $m[1];
return isset(dibi::$substs[$m]) ? dibi::$substs[$m] : call_user_func(dibi::$substFallBack, $m);
return dibi::$substs->{$m[1]};
}
}