<?php
+
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org> //
-// available at http://getid3.sourceforge.net //
-// or http://www.getid3.org //
-// also https://github.com/JamesHeinrich/getID3 //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details //
+// available at https://github.com/JamesHeinrich/getID3 //
+// or https://www.getid3.org //
+// or http://getid3.sourceforge.net //
+// see readme.txt for more details //
/////////////////////////////////////////////////////////////////
// //
// module.misc.cue.php //
{
public $cuesheet = array();
+ /**
+ * @return bool
+ */
public function Analyze() {
$info = &$this->getid3->info;
return true;
}
-
-
+ /**
+ * @param string $filename
+ *
+ * @return array
+ */
public function readCueSheetFilename($filename)
{
$filedata = file_get_contents($filename);
return $this->readCueSheet($filedata);
}
+
/**
- * Parses a cue sheet file.
- *
- * @param string $filename - The filename for the cue sheet to open.
- */
+ * Parses a cue sheet file.
+ *
+ * @param string $filedata
+ *
+ * @return array
+ */
public function readCueSheet(&$filedata)
{
$cue_lines = array();
}
/**
- * Parses the cue sheet array.
- *
- * @param array $file - The cuesheet as an array of each line.
- */
+ * Parses the cue sheet array.
+ *
+ * @param array $file - The cuesheet as an array of each line.
+ */
public function parseCueSheet($file)
{
//-1 means still global, all others are track specific
}
/**
- * Parses the REM command.
- *
- * @param string $line - The line in the cue file that contains the TRACK command.
- * @param integer $track_on - The track currently processing.
- */
+ * Parses the REM command.
+ *
+ * @param string $line - The line in the cue file that contains the TRACK command.
+ * @param integer $track_on - The track currently processing.
+ */
public function parseComment($line, $track_on)
{
$explodedline = explode(' ', $line, 3);
}
/**
- * Parses the FILE command.
- *
- * @param string $line - The line in the cue file that contains the FILE command.
- * @return array - Array of FILENAME and TYPE of file..
- */
+ * Parses the FILE command.
+ *
+ * @param string $line - The line in the cue file that contains the FILE command.
+ *
+ * @return array - Array of FILENAME and TYPE of file..
+ */
public function parseFile($line)
{
$line = substr($line, strpos($line, ' ') + 1);
}
/**
- * Parses the FLAG command.
- *
- * @param string $line - The line in the cue file that contains the TRACK command.
- * @param integer $track_on - The track currently processing.
- */
+ * Parses the FLAG command.
+ *
+ * @param string $line - The line in the cue file that contains the TRACK command.
+ * @param integer $track_on - The track currently processing.
+ */
public function parseFlags($line, $track_on)
{
if ($track_on != -1)
}
/**
- * Collect any unidentified data.
- *
- * @param string $line - The line in the cue file that contains the TRACK command.
- * @param integer $track_on - The track currently processing.
- */
+ * Collect any unidentified data.
+ *
+ * @param string $line - The line in the cue file that contains the TRACK command.
+ * @param integer $track_on - The track currently processing.
+ */
public function parseGarbage($line, $track_on)
{
if ( strlen($line) > 0 )
}
/**
- * Parses the INDEX command of a TRACK.
- *
- * @param string $line - The line in the cue file that contains the TRACK command.
- * @param integer $track_on - The track currently processing.
- */
+ * Parses the INDEX command of a TRACK.
+ *
+ * @param string $line - The line in the cue file that contains the TRACK command.
+ * @param integer $track_on - The track currently processing.
+ */
public function parseIndex($line, $track_on)
{
$type = strtolower(substr($line, 0, strpos($line, ' ')));
$line = substr($line, strpos($line, ' ') + 1);
+ $number = 0;
if ($type == 'index')
{
}
}
+ /**
+ * @param string $line
+ * @param int $track_on
+ */
public function parseString($line, $track_on)
{
$category = strtolower(substr($line, 0, strpos($line, ' ')));
}
/**
- * Parses the TRACK command.
- *
- * @param string $line - The line in the cue file that contains the TRACK command.
- * @param integer $track_on - The track currently processing.
- */
+ * Parses the TRACK command.
+ *
+ * @param string $line - The line in the cue file that contains the TRACK command.
+ * @param integer $track_on - The track currently processing.
+ */
public function parseTrack($line, $track_on)
{
$line = substr($line, strpos($line, ' ') + 1);