프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$getID3 | getID\getID3 | The getID3 object, for ID3 tag reading. | |
$hash | string | This value is unique, and can be used to query a Song record. | |
$mtime | integer | The file's last modified time. | |
$path | string | The file's path. | |
$song | The song model that's associated with this file. | ||
$splFileInfo | SplFileInf\SplFileInfo | The SplFileInfo object of the file. | |
$syncError | string | The last parsing error text, if any. |
메소드 | 설명 | |
---|---|---|
__construct ( string | SplFileInf\SplFileInfo $path, getID\getID3 $getID3 = null ) | Construct our File object. | |
getGetID3 ( ) : getID\getID3 | ||
getHash ( string $path ) : string | Get a unique hash from a file path. | |
getInfo ( ) : array | void | Get all applicable ID3 info from the file. | |
getPath ( ) : string | ||
getSyncError ( ) : syncError | Get the last parsing error's text. | |
isChanged ( ) : boolean | Determine if the file is changed (its Song record is found, but the timestamp is different). | |
isNew ( ) : boolean | Determine if the file is new (its Song record can't be found in the database). | |
isNewOrChanged ( ) : boolean | Determine if the file is new or changed. | |
setGetID3 ( getID\getID3 $getID3 = null ) | ||
sync ( array $tags, boolean $force = false ) : boolean | |
Sync the song with all available media info against the database. |
메소드 | 설명 | |
---|---|---|
getCoverFileUnderSameDirectory ( ) : string | false | Issue #380. |
public __construct ( string | SplFileInf\SplFileInfo $path, getID\getID3 $getID3 = null ) | ||
$path | string | SplFileInf\SplFileInfo | Either the file's path, or a SplFileInfo object |
$getID3 | getID\getID3 | A getID3 object for DI (and better performance) |
public getSyncError ( ) : syncError | ||
리턴 | syncError |
public isNewOrChanged ( ) : boolean | ||
리턴 | boolean |
public sync ( array $tags, boolean $force = false ) : boolean | |
||
$tags | array | The (selective) tags to sync (if the song exists) |
$force | boolean | Whether to force syncing, even if the file is unchanged |
리턴 | boolean | |
A Song object on success, true if file exists but is unmodified, or false on an error. |
protected getID3,getID $getID3 | ||
리턴 | getID\getID3 |
protected string $hash | ||
리턴 | string |
protected Song,app\models $song | ||
리턴 |
protected SplFileInfo,SplFileInf $splFileInfo | ||
리턴 | SplFileInf\SplFileInfo |