2017 © Pedro Peláez
 

library cowsay

An extensible PHP port of the Cowsay linux utility

image

gipetto/cowsay

An extensible PHP port of the Cowsay linux utility

  • Sunday, November 12, 2017
  • by Gipetto
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,933 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 4 % Grown

The README.md

PHP CowSay

Release Version Packagist Version Build Status Moo, Cow, (*1)

An extensible PHP port of the Linux Cowsay utility., (*2)

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, (*3)

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:, (*4)

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

Run php demo.php to see all the included cows and their traits., (*5)

Traits

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

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

Displays:, (*7)

  ------------
< 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., (*8)

Adding New Traits

It is easy to add new Traits to CowSay. See the Custom Traits documentation for more information., (*9)

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)., (*10)

The Versions

12/11 2017

dev-master

9999999-dev http://github.com/Gipetto/CowSay

An extensible PHP port of the Cowsay linux utility

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Shawn Parker

cowsay cows cow

30/03 2017

dev-test-more-versions

dev-test-more-versions http://github.com/Gipetto/CowSay

An extensible PHP port of the Cowsay linux utility

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Shawn Parker

cowsay cows cow

26/11 2015

dev-psr-whatever

dev-psr-whatever http://github.com/Gipetto/CowSay

An extensible PHP port of the Cowsay linux utility

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Shawn Parker

cowsay cows cow

26/11 2015

1.0.4

1.0.4.0 http://github.com/Gipetto/CowSay

An extensible PHP port of the Cowsay linux utility

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Shawn Parker

cowsay cows cow

04/10 2015

1.0.3

1.0.3.0 http://github.com/Gipetto/CowSay

An extensible PHP port of the Cowsay linux utility

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Shawn Parker

cowsay cows cow

14/05 2015

1.0.2

1.0.2.0 http://github.com/Gipetto/CowSay

An extensible PHP port of the Cowsay linux utility

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Shawn Parker

cowsay cows cow

14/05 2015

1.0.1

1.0.1.0 http://github.com/Gipetto/CowSay

An extensible PHP port of the Cowsay linux utility

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Shawn Parker

cowsay cows cow

14/05 2015

1.0

1.0.0.0 http://github.com/Gipetto/CowSay

An extensible PHP port of the Cowsay linux utility

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Shawn Parker

cows