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:
@@ -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**/
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user