private function sanitise($value)
    {
        if ($value instanceof VerbalExpression) {
            // no need to run sanitisation on an existing expression object
            return $value;
        }

        if (!is_string($value)) {
            $value = (string)$value;
        }

        $regExp  = '/[^\w]/';

        return preg_replace_callback(
            $regExp,
            function ($matches) {
                return "\\" . $matches[0];
            },
            $value
        );
    }
private function sanitise($value)
    {
        if ($value instanceof VerbalExpression) {
            // no need to run sanitisation on an existing expression object
            return $value;
        }

        if (!is_string($value)) {
            $value = (string)$value;
        }

        $regExp  = '/[^\w]/';

        return preg_replace_callback(
            $regExp,
            function ($matches) {
                return "\\" . $matches[0];
            },
            $value
        );
    }
private function sanitise ( $ value ) { if ( $ value instanceof VerbalExpression ) { // no need to run sanitisation on an existing expression object return $ value ; } if ( ! is_string ( $ value ) ) { $ value = ( string ) $ value ; } $ regExp = '/[^\w]/' ; return preg_replace_callback ( $ regExp , function ( $ matches ) { return "\\" . $ matches [ 0 ] ; } , $ value ) ; }
Sanitise the added value

@param mixed $value Value to sanitise

@return string
Sanitise the added value