The ISRC class is a PHP class that represents an International Standard Recording Code (ISRC). It provides methods to manipulate ISRC codes by parsing, retrieving components, and generating new codes.
You can include the ISRC class in your project by requiring it through Composer:
composer require bmt/isrc
Instantiate the ISRC class by providing the necessary parameters: country code, registrant code, year, and designation code. You can then use various methods to interact with the ISRC object.
use Bmt\ISRC\ISRC;
$isrc = new ISRC("US", "ABC", "21", "12345");
You can retrieve individual components of the ISRC code:
$countryCode = $isrc->getCountryCode(); // Returns the country code (e.g., "US")
$registrantCode = $isrc->getRegistrantCode(); // Returns the registrant code (e.g., "ABC")
$year = $isrc->getYear(); // Returns the year (e.g., "21")
$designationCode = $isrc->getDesignationCode(); // Returns the designation code (e.g., "12345")
Generate a complete ISRC code based on the stored components:
$newIsrcCode = $isrc->generateISRC(); // Returns a new ISRC code (e.g., "USABC2112345")
You can also convert the ISRC object to a string, which returns the generated ISRC code:
$isrcString = (string)$isrc; // Returns the ISRC code as a string (e.g., "USABC2112345")
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to modify and customize the README file to fit your specific project needs.