Source for file MusicLibrary.php

Documentation is available at MusicLibrary.php

  1. <?php
  2.  
  3. # Copyright (c) 2002-2005 Cunningham & Cunningham, Inc.
  4. # Released under the terms of the GNU General Public License version 2 or later.
  5. #
  6. # PHP5 translation by Luis A. Floreani <luis.floreani@gmail.com>
  7.  
  8. require_once("config.php");
  9. require_once("Music.php");
  10.  
  11. class MusicLibrary {
  12. /**
  13. * @var Music
  14. */
  15. public static $library = array();
  16. public static $looking = null;
  17. public static function load($path) {
  18. $fp = fopen(PHPFIT_DIR . LIB_DIR . $path, "r");
  19. fgets($fp); // skip column headings
  20. while ($line = fgets($fp)) {
  21. self::$library[] = Music::parse($line);
  22. }
  23. //var_dump(self::$library);
  24. fclose($fp);
  25. }
  26. /**
  27. * @param Music m
  28. */
  29. static function select($m) {
  30. self::$looking = $m;
  31. }
  32. }
  33. ?>

Documentation generated on Sun, 02 Apr 2006 16:01:05 +0200 by phpDocumentor 1.3.0RC5