1
0
mirror of https://github.com/dg/dibi.git synced 2025-09-01 02:01:48 +02:00

- smarter handling of substitutions :subst: outside of brackets []

This commit is contained in:
David Grudl
2009-03-08 23:27:31 +00:00
parent d0097d6c9c
commit 97969edace
3 changed files with 33 additions and 22 deletions

View File

@@ -134,7 +134,7 @@ class dibi
public static $substs = array();
/** @var callback Substitution fallback */
public static $substFallBack;
public static $substFallBack = array(__CLASS__, 'defaultSubstFallback');
/** @var array @see addHandler */
private static $handlers = array();
@@ -647,6 +647,18 @@ class dibi
/**
* Default substitution fallback handler.
* @param string
* @return mixed
*/
public static function defaultSubstFallback($expr)
{
throw new InvalidStateException("Missing substitution for '$expr' expression.");
}
/********************* misc tools ****************d*g**/