Download the PHP package ramazancetinkaya/morse-code without Composer
On this page you can find all versions of the php package ramazancetinkaya/morse-code. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ramazancetinkaya/morse-code
More information about ramazancetinkaya/morse-code
Files in ramazancetinkaya/morse-code
Package morse-code
Short Description A simple PHP library for converting text to Morse code and vice versa
License MIT
Informations about the package morse-code
Morse Code Library
A modern PHP library for encoding and decoding Morse code with extended configuration options.
Report a Bug · New Pull Request
Features
- Encode and decode Morse code seamlessly.
- Customizable delimiters for letters and words.
- Multiple handling options for unknown characters.
- Configurable case preservation.
- Structured error handling with custom exceptions.
- Fully object-oriented and extensible.
Installation
This library can be easily installed using Composer, a modern PHP dependency manager.
Step 1: Install Composer
If you don't have Composer installed, you can download and install it by following the instructions on the official Composer website.
Step 2: Install the Library
Once Composer is installed, you can install the morse-code
library by running the following command in your project's root directory:
Alternatively, download the source code and include it in your project manually.
Requirements
- PHP 8.0 or higher.
- No additional dependencies.
Usage
Configuration Options
Option | Description |
---|---|
unknownCharHandling |
Defines how unknown characters are handled (IGNORE , REPLACE , THROW_EXCEPTION ). |
replacementChar |
Specifies the character used when REPLACE mode is enabled. |
preserveCase |
If true , preserves original case; otherwise, converts text to uppercase. |
letterDelimiter |
Defines the separator between Morse code letters. |
wordDelimiter |
Defines the separator between Morse code words. |
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.
Author
Developed by Ramazan Çetinkaya.