alrik11es / cowsayphp
PHP中的Cowsay端口
1.2.0
2016-08-25 07:53 UTC
Requires
- php: >=5.6.0
Requires (Dev)
- phpunit/phpunit: 5.*
- scrutinizer/ocular: ~1.1
This package is auto-updated.
Last update: 2024-08-26 00:02:58 UTC
README
你还记得经典的Linux Cowsay吗?这是一个PHP端口的版本,如果你想在终端应用中到处看到可爱的牛。
现在支持更多农场动物。
安装
通过Composer
$ composer require alrik11es/cowsayphp
需要PHP >=5.6
使用
use Cowsayphp\Farm; $cow = Farm::create(\Cowsayphp\Farm\Cow::class); echo '<pre>'.$cow->say("Ohmg I'm a cow!").'</pre>';
结果
< Ohmg I'm a cow! >
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
其他动物
\Cowsayphp\Farm\Whale::class
< hello I'm a whale! >
\
\ ## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
\Cowsayphp\Farm\Dragon::class
< Dragon! >
\ / \ //\
\ |\___/| / \// \\
/0 0 \__ / // | \ \
/ / \/_/ // | \ \
@_^_@'/ \/_ // | \ \
//_^_/ \/_ // | \ \
( //) | \/// | \ \
( / /) _|_ / ) // | \ _\
( // /) '/,_ _ _/ ( ; -. | _ _\.-~ .-~~~^-.
(( / / )) ,-{ _ `-.|.-~-. .~ `.
(( // / )) '/\ / ~-. _ .-~ .-~^-. \
(( /// )) `. { } / \ \
(( / )) .----~-.\ \-' .~ \ `. \^-.
///.----..> \ _ -~ `. ^-` ^-_
///-._ _ _ _ _ _ _}^ - - - - ~ ~-- ,.-~
\Cowsayphp\Farm\Tux::class
< Tux present! >
\
\
.--.
|o_o |
|:_/ |
// \ \
(| | )
/'\_ _/`\
\___)=(___/
已弃用使用
这将在未来的版本中被弃用。但仍然可以使用。
use Cowsayphp\Cow; echo '<pre>'.Cow::say("Ohmg I'm a cow!").'</pre>';
测试
$ ./bin/phpunit
贡献
请参阅 CONTRIBUTING 获取详细信息。
致谢
许可证
MIT许可证(MIT)。请参阅 许可证文件 获取更多信息。