lib/bagit.php
private function _writeBagInfo()
    {
        $lines = array();

        if (count($this->bagInfoData)) {
            foreach ($this->bagInfoData as $label => $value) {
                if (is_array($value)) {
                    foreach ($value as $v) {
                        $lines[] = "$label: $v\n";
                    }
                } else {
                    $lines[] = "$label: $value\n";
                }
            }
        }

        writeFileText($this->bagInfoFile, $this->tagFileEncoding, join('', $lines));
    }
private function _writeBagInfo()
    {
        $lines = array();

        if (count($this->bagInfoData)) {
            foreach ($this->bagInfoData as $label => $value) {
                if (is_array($value)) {
                    foreach ($value as $v) {
                        $lines[] = "$label: $v\n";
                    }
                } else {
                    $lines[] = "$label: $value\n";
                }
            }
        }

        writeFileText($this->bagInfoFile, $this->tagFileEncoding, join('', $lines));
    }
private function _writeBagInfo ( ) { $ lines = array ( ) ; if ( count ( $ this -> bagInfoData ) ) { foreach ( $ this -> bagInfoData as $ label => $ value ) { if ( is_array ( $ value ) ) { foreach ( $ value as $ v ) { $ lines [ ] = "$label: $v\n" ; } } else { $ lines [ ] = "$label: $value\n" ; } } } writeFileText ( $ this -> bagInfoFile , $ this -> tagFileEncoding , join ( '' , $ lines ) ) ; }
This writes the bag-info.txt file with the contents of bagInfoData.

@return void
@author Eric Rochester <erochest@virginia.edu>
This writes the bag - info . txt file with the contents of bagInfoData .