Giter VIP home page Giter VIP logo

isrc's Introduction

ISRC Class

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.

Installation

You can include the ISRC class in your project by requiring it through Composer:

composer require bmt/isrc

Usage

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.

Creating an ISRC Object

use Bmt\ISRC\ISRC;

$isrc = new ISRC("US", "ABC", "21", "12345");

Retrieving ISRC Components

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")

Generating a Complete ISRC Code

Generate a complete ISRC code based on the stored components:

$newIsrcCode = $isrc->generateISRC(); // Returns a new ISRC code (e.g., "USABC2112345")

Converting to String

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")

License

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.

isrc's People

Contributors

bmtmohammedtaha avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.