public static function serializeAnnotations($annotations, $glue = '')
    {
        $returnValue = (string) '';

        // Set default glue.
        if ($glue == ''){
            $glue = "\n    ";
        }
        
        $a = array();
        foreach ($annotations as $n => $v){
            $v = str_replace("\\", "\\\\", $v);
            $v = str_replace('--', "\\-\\-", $v);
            $a[] = '@' . trim($n) . " ${v}";
        }
        $returnValue = implode($glue, $a);

        return (string) $returnValue;
    }
public static function serializeAnnotations($annotations, $glue = '')
    {
        $returnValue = (string) '';

        // Set default glue.
        if ($glue == ''){
            $glue = "\n    ";
        }
        
        $a = array();
        foreach ($annotations as $n => $v){
            $v = str_replace("\\", "\\\\", $v);
            $v = str_replace('--', "\\-\\-", $v);
            $a[] = '@' . trim($n) . " ${v}";
        }
        $returnValue = implode($glue, $a);

        return (string) $returnValue;
    }
public static function serializeAnnotations ( $ annotations , $ glue = '' ) { $ returnValue = ( string ) '' ; // Set default glue. if ( $ glue == '' ) { $ glue = "\n    " ; } $ a = array ( ) ; foreach ( $ annotations as $ n => $ v ) { $ v = str_replace ( "\\" , "\\\\" , $ v ) ; $ v = str_replace ( '--' , "\\-\\-" , $ v ) ; $ a [ ] = '@' . trim ( $ n ) . " ${v}" ; } $ returnValue = implode ( $ glue , $ a ) ; return ( string ) $ returnValue ; }
Serializes an associative array of annotations where keys are annotation
and values are annotation values.

@access public
@author Jerome Bogaerts <jerome@taotesting.com>
@param  array annotations An associative array that represents a collection of annotations, where keys are the annotation names and values the annotation values.
@param  string glue Indicates what is the glue between serialized annotations.
@return string
Serializes an associative array of annotations where keys are annotation and values are annotation values .