rexxars/morse

生成摩尔斯电码(文本和/或wav音频)

1.0.0 2015-11-04 22:20 UTC

This package is auto-updated.

Last update: 2024-08-29 04:30:59 UTC


README

PHP摩尔斯电码工具。

Build Status

用法

<?php
// Translate from/to morse:
$text = new Morse\Text();
$morse = $text->toMorse('SOS');

echo $morse; // ... --- ...
echo $text->fromMorse($morse); // SOS

// Generate a WAV-file:
$wav = new Morse\Wav();
file_put_contents('sos.wav', $wav->generate('SOS'));

安装

要将 morse-php 包含到您的项目中,请将其添加到您的 composer.json 文件中

{
    "require": {
        "rexxars/morse": "^1.0.0"
    }
}

许可证

MIT许可证。有关完整条款,请参阅LICENSE。