public static function addKeyword($name, $keyword)
    {
        $key = self::normalizeKeywordName($name);

        if (isset(self::$keywords[$key])) {
            throw new PhugException(
                'Keyword '.$name.' is already set.'
            );
        }

        self::setKeyword($name, $keyword);
    }
public static function addKeyword($name, $keyword)
    {
        $key = self::normalizeKeywordName($name);

        if (isset(self::$keywords[$key])) {
            throw new PhugException(
                'Keyword '.$name.' is already set.'
            );
        }

        self::setKeyword($name, $keyword);
    }
public static function addKeyword ( $ name , $ keyword ) { $ key = self :: normalizeKeywordName ( $ name ) ; if ( isset ( self :: $ keywords [ $ key ] ) ) { throw new PhugException ( 'Keyword ' . $ name . ' is already set.' ) ; } self :: setKeyword ( $ name , $ keyword ) ; }
Add a keyword. Throws an exception if the name is already taken.

@param string          $name
@param callable|string $keyword

@throws PhugException
Add a keyword . Throws an exception if the name is already taken .