Permalink
Browse files

updated generated file header layout

  • Loading branch information...
1 parent e9f18d0 commit e051849efb9bcee2fb2528a706cb02404908e1e8 @nocive committed Mar 15, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Freesound.php
View
4 lib/Freesound.php
@@ -53,12 +53,13 @@ public static function BundleBuild( $file )
$content = "<?php\n\n";
$content .= "/**\n";
+ $content .= " * DO NOT EDIT THIS FILE!!\n";
$content .= " * This file was automatically generated by PHP.\n";
- $content .= " * Do NOT edit this file!\n";
$content .= " *\n";
$content .= " * Generated at: " . date( 'r' ) . "\n";
$content .= " */\n";
$content .= "define( 'FREESOUND_BUNDLE', true );\n\n";
+
foreach( $classpaths as $path ) {
$f = __DIR__ . DIRECTORY_SEPARATOR . $path . self::CLASS_EXTENSION;
if (false === ($c = @file_get_contents( $f ))) {
@@ -68,6 +69,7 @@ public static function BundleBuild( $file )
$c = preg_replace( array( '#<\?(?:php)?\s*#s', '#\?\>(?=([\s\n]+)?$(?!\n))#s' ), null, $c );
$content .= "$c\n\n";
}
+
$content .= "?>";
return @file_put_contents( $file, $content ) !== false;

0 comments on commit e051849

Please sign in to comment.