protected function _replaceConstants($value)
    {
        foreach ($this->_getConstants() as $constant) {
            if (strstr($value, $constant)) {
                // handle backslashes that may represent windows path names for instance
                $replacement = str_replace('\\', '\\\\', constant($constant));
                $value = str_replace($constant, $replacement, $value);
            }
        }
        return $value;
    }