2017 © Pedro Peláez
 

library php-enum

PHP enum class that OO way to manipulate enums

image

jayzeng/php-enum

PHP enum class that OO way to manipulate enums

  • Friday, June 28, 2013
  • by jayzeng
  • Repository
  • 1 Watchers
  • 0 Stars
  • 77 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

PHP Enum

Latest Stable Version Total DownloadsBuild Status, (*1)

Project website: (http://jayzeng.github.com/PHPEnum/), (*2)

Usage:


class StubUtilEnum extends Enum { const ONE = 1; const TWO = 2; const THREE = 3; const FOUR = "four"; } // Retrieve value mapped to the label $StubUtilEnum->getValue('ONE'); // returns 1 $StubUtilEnum->getValue('FOUR'); // returns four $StubUtilEnum->getValues(); // array // Determine if a label exists $StubUtilEnum->hasLabel(1); // true $StubUtilEnum->hasLabel('oops'); // false

Details

See https://github.com/jayzeng/PHPEnum/blob/master/Tests/Src/EnumTest.php, (*3)

Issues & Development

How to release new version?

  • RELEASE_VERSION - version number
  • RELEASE_MESSAGE - release message
make release RELEASE_VERSION="0.1" RELEASE_MESSAGE="v0.1 is released"

Author:

Jay Zeng, e-mail: jayzeng@jay-zeng.com, (*4)

The Versions

28/06 2013

dev-master

9999999-dev https://github.com/jayzeng/PHPEnum.git

PHP enum class that OO way to manipulate enums

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

enum util

07/03 2013

dev-refactor/foo

dev-refactor/foo https://github.com/jayzeng/PHPEnum.git

PHP enum class that OO way to manipulate enums

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

enum util

02/03 2013

0.2

0.2.0.0 https://github.com/jayzeng/PHPEnum.git

PHP enum class that OO way to manipulate enums

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

enum util

02/03 2013

dev-READEME

dev-READEME https://github.com/jayzeng/PHPEnum.git

PHP enum class that OO way to manipulate enums

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

enum util

01/03 2013

0.1

0.1.0.0 https://github.com/jayzeng/PHPEnum.git

PHP enum class that OO way to manipulate enums

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

enum util