Beispiel #1
0
 /**
  * Add a PHP constant to the extension
  *
  * @access public
  * @param  object   a constant object
  */
 function addConstant(CodeGen_PECL_Element_Constant $constant)
 {
     $name = $constant->getName();
     if (isset($this->constants[$name])) {
         return PEAR::raiseError("constant '{$name}' has been defined before");
     }
     $this->constants[$name] = $constant;
     return true;
 }