Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 204 | All time: 8,438 This week: 673 |
Version | License | PHP version | Categories | |||
morsecode 1.2.1 | MIT/X Consortium ... | 7.1 | PHP 5, Text processing, Audio |
This package allows you to encode or decode morsecode messages.
If you wish to encode your message you can use the encode method.
use johnnymast\Morsecode\Morsecode;
$morse = new Morsecode();
echo $morse->encode('This is a test');
If you wish to decode your message you can use the decode method.
use johnnymast\Morsecode\Morsecode;
$morse = new Morsecode();
echo $morse->decode('- .... .. ... / .. ... / .- / - . ... -');
You can also pass the message you wish you encode or decode via the constructor of the class like so.
use johnnymast\Morsecode\Morsecode;
$morse = new Morsecode('This is a test');
echo $morse->encode();
The encode and decode methods could return en empty string if no translation could be made. So please take note of this.
Using composer:
$ composer require johnnymast/morsecode
The following versions of PHP are supported by this version.
This package is created and maintained by Johnny Mast. If you have any questions feel free to contact me on twitter by using @mastjohnny in your tweet.
MIT License
Copyright (c) 2019 Johnny Mast
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Files (11) |
File | Role | Description | ||
---|---|---|---|---|
spec (1 file) | ||||
src (1 file) | ||||
tests (1 file) | ||||
.php_cs | Example | Example script | ||
.scrutinizer.yml | Data | Auxiliary data | ||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
LICENSE.md | Lic. | Added MIT license. | ||
phpspec.yml | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.