承接 gipetto/cowsay 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gipetto/cowsay

最新稳定版本:2.1.0

Composer 安装命令:

composer require gipetto/cowsay

包简介

An extensible PHP port of the Cowsay linux utility

README 文档

README

Release Version Packagist Version Build Status Moo, Cow

An extensible PHP port of the Linux Cowsay utility.

Requirements

  • Minimum: PHP 8.1+
  • Recommended: PHP 8.2+

CowSay will update to stay in step with the latest, actively supported PHP version. See the Official PHP list of supported versions

Install

$ composer require Gipetto/CowSay

Quickstart

use CowSay\Cow;

$bessie = new Cow('Hello, Farm!');

// store the output in a variable
$output = $bessie->say();
echo $output;

// or just echo the object for direct output
echo $bessie;

Displays:

  ------------
< Hello, Farm! >
  ------------
          \   ^__^
           \  (oo)\_______
              (__)\       )\/\
                  ||----w |
                  ||     ||

Run php demo.php to see all the included cows and their traits.

Traits

Cows support a few traits. You can specify the Eyes, Tongue, Udder and, yes, you can specify Poop.

$bessie = new Cow('Hello, Farm!');
$bessie->setEyes('oO')
    ->setTongue('U')
    ->setPoop('@@@')
    ->setUdder('W');
echo $bessie;

Displays:

  ------------
< Hello, Farm! >
  ------------
          \   ^__^
           \  (oO)\_______
              (__)\       )\/\
               U  ||----W |
                  ||     || @@@

Extending CowSay

Adding New Carcases

CowSay is easily extended to add new carcases for your custom needs. See the Carcasses tutorial for more information.

Adding New Traits

It is easy to add new Traits to CowSay. See the Custom Traits documentation for more information.

Known Issues

  • Line length calculations are not fully understood for strings with longer byte length characters. ie: Chinese.

License

CowSay is licensed under The MIT License (MIT).

统计信息

  • 总下载量: 6.59k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固