Пример #1
0
        /// <summary>
        /// Tries to get a global constant from current context.
        /// </summary>
        public bool TryGetConstant(string name, out PhpValue value)
        {
            int idx = 0;

            value = _constants.GetConstant(name, ref idx);
            return(value.IsSet);
        }
Пример #2
0
 /// <summary>
 /// Tries to get a global constant from current context.
 /// </summary>
 internal bool TryGetConstant(string name, out PhpValue value, ref int idx)
 {
     value = _constants.GetConstant(name, ref idx);
     return(value.IsSet);
 }
Пример #3
0
        /// <summary>
        /// Gets a constant value.
        /// </summary>
        public PhpValue GetConstant(string name, ref int idx)
        {
            return(_constants.GetConstant(name, ref idx));

            // TODO: check the constant is valid (PhpValue.IsSet) otherwise Warning: undefined constant
        }