_getConstants example

return $value;
    }

    /** * Replace any constants referenced in a string with their values * * @param string $value * @return string */
    protected static function _replaceConstants($value)
    {
        foreach (self::_getConstants() as $constant) {
            if (strstr($value$constant)) {
                $value = str_replace($constantconstant($constant)$value);
            }
        }
        return $value;
    }

    /** * Get (reverse) sorted list of defined constant names * * @return array */
return $config;
    }

    /** * Replace any constants referenced in a string with their values * * @param string $value * @return string */
    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;
    }

    /** * Get (reverse) sorted list of defined constant names * * @return array */
Home | Imprint | This part of the site doesn't use cookies.