| @@ 15-64 (lines=50) @@ | ||
| 12 | * |
|
| 13 | * @package GravityMedia\Metadata\ID3v2 |
|
| 14 | */ |
|
| 15 | class Encoding |
|
| 16 | { |
|
| 17 | /** |
|
| 18 | * The ISO-8859-1 encoding. |
|
| 19 | */ |
|
| 20 | const ISO_8859_1 = 0; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * The UTF-16 Unicode encoding with BOM. |
|
| 24 | * */ |
|
| 25 | const UTF_16 = 1; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * The UTF-16BE Unicode encoding without BOM. |
|
| 29 | */ |
|
| 30 | const UTF_16BE = 2; |
|
| 31 | ||
| 32 | /** |
|
| 33 | * The UTF-8 Unicode encoding. |
|
| 34 | */ |
|
| 35 | const UTF_8 = 3; |
|
| 36 | ||
| 37 | /** |
|
| 38 | * The UTF-16LE Unicode encoding without BOM. |
|
| 39 | * */ |
|
| 40 | const UTF_16LE = 4; |
|
| 41 | ||
| 42 | /** |
|
| 43 | * Valid values. |
|
| 44 | * |
|
| 45 | * @var int[] |
|
| 46 | */ |
|
| 47 | protected static $values = [ |
|
| 48 | self::ISO_8859_1, |
|
| 49 | self::UTF_16, |
|
| 50 | self::UTF_16BE, |
|
| 51 | self::UTF_8, |
|
| 52 | self::UTF_16LE |
|
| 53 | ]; |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Return valid values. |
|
| 57 | * |
|
| 58 | * @return int[] |
|
| 59 | */ |
|
| 60 | public static function values() |
|
| 61 | { |
|
| 62 | return static::$values; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| @@ 15-64 (lines=50) @@ | ||
| 12 | * |
|
| 13 | * @package GravityMedia\Metadata\ID3v2\Flag |
|
| 14 | */ |
|
| 15 | class HeaderFlag |
|
| 16 | { |
|
| 17 | /** |
|
| 18 | * Unsynchronisation flag |
|
| 19 | */ |
|
| 20 | const FLAG_UNSYNCHRONISATION = 0; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Compression flag |
|
| 24 | */ |
|
| 25 | const FLAG_COMPRESSION = 1; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * Extended header flag |
|
| 29 | */ |
|
| 30 | const FLAG_EXTENDED_HEADER = 2; |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Experimental indicator flag |
|
| 34 | */ |
|
| 35 | const FLAG_EXPERIMENTAL_INDICATOR = 3; |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Footer present flag |
|
| 39 | */ |
|
| 40 | const FLAG_FOOTER_PRESENT = 4; |
|
| 41 | ||
| 42 | /** |
|
| 43 | * Valid values |
|
| 44 | * |
|
| 45 | * @var int[] |
|
| 46 | */ |
|
| 47 | protected static $values = [ |
|
| 48 | self::FLAG_UNSYNCHRONISATION, |
|
| 49 | self::FLAG_COMPRESSION, |
|
| 50 | self::FLAG_EXTENDED_HEADER, |
|
| 51 | self::FLAG_EXPERIMENTAL_INDICATOR, |
|
| 52 | self::FLAG_FOOTER_PRESENT |
|
| 53 | ]; |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Return valid values |
|
| 57 | * |
|
| 58 | * @return int[] |
|
| 59 | */ |
|
| 60 | public static function values() |
|
| 61 | { |
|
| 62 | return static::$values; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||