protected function interpolateContext ($sMessage, array $aContext)
    {
        // build a replacement array with braces around the context keys
        $aReplace = array();
        foreach ($aContext as $sKey => $mValue) {
            $sValue = (string)$mValue;
            $aReplace['{' . trim($sKey) . '}'] = $sValue;
        }

        // interpolate replacement values into the message and return
        return strtr($sMessage, $aReplace);
    }
protected function interpolateContext ($sMessage, array $aContext)
    {
        // build a replacement array with braces around the context keys
        $aReplace = array();
        foreach ($aContext as $sKey => $mValue) {
            $sValue = (string)$mValue;
            $aReplace['{' . trim($sKey) . '}'] = $sValue;
        }

        // interpolate replacement values into the message and return
        return strtr($sMessage, $aReplace);
    }
protected function interpolateContext ( $ sMessage , array $ aContext ) { // build a replacement array with braces around the context keys $ aReplace = array ( ) ; foreach ( $ aContext as $ sKey => $ mValue ) { $ sValue = ( string ) $ mValue ; $ aReplace [ '{' . trim ( $ sKey ) . '}' ] = $ sValue ; } // interpolate replacement values into the message and return return strtr ( $ sMessage , $ aReplace ) ; }
Interpolates context values into the message placeholders.
Taken from PSR-3's example implementation.

Placeholder names MUST be delimited with a single opening brace { and a single closing brace }.
There MUST NOT be any whitespace between the delimiters and the placeholder name.
Placeholder names SHOULD be composed only of the characters A-Z, a-z, 0-9, underscore _, and period ..
The use of other characters is reserved for future modifications of the placeholders specification.

Placeholders in the form {foo} will be replaced by the context data in key "foo".

@param string $sMessage message with placeholders
@param array $aContext context array
@return string message whose placeholders are replaced by context values
Interpolates context values into the message placeholders . Taken from PSR - 3 s example implementation .