public function getConstant($key)
    {
        $returnValue = null;

        $constants = $this->getConstants();
        if (isset($constants[$key])) {
        	$returnValue = $constants[$key];
        } elseif (defined($key)) {
        	common_logger::w('constant outside of extension called: '.$key);
        	$returnValue = constant($key);
        } else {
        	throw new common_exception_Error('Unknown constant \''.$key.'\' for extension '.$this->id);
        }

        return $returnValue;
    }