2017 © Pedro Peláez
 

library table-flip

Essential exception class needed by every good project.

image

sgolemon/table-flip

Essential exception class needed by every good project.

  • Sunday, October 8, 2017
  • by sgolemon
  • Repository
  • 11 Watchers
  • 295 Stars
  • 2,469 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 4 Versions
  • 4 % Grown

The README.md

if ($situation === SHIT::HAPPENED) {(╯°□°)╯︵┻━┻(); }, (*1)

Usages: * throw new (╯°□°)╯︵┻━┻; // TableFlip * throw new (ノ゜Д゜)ノ︵┻━┻; // PudgyTableFlip * throw new (ノಥ益ಥ)ノ︵┻━┻; // AgroTableFlip * (╯°□°)╯︵┻━┻(); // Function shorthand * assert((╯°□°)╯︵┻━┻() ); // Use in an assert to only flip in dev, (*2)

All three table-flip classes extend \Exception and implement the ┻━┻ interface, so the following works:, (*3)

try {
  $ret = doSomething();
  if ($ret === null) {
    throw new (╯°□°)╯︵┻━┻;
  } elseif ($ret === false) {
    throw new (ノಥ益ಥ)ノ︵┻━┻;
  } elseif (!is_string($ret)) {
    throw new (ノ゜Д゜)ノ︵┻━┻;
  }
} catch (┻━┻ $e) {
  ┬─┬ノ(・_・ノ);
}

Note that the parentheses used in the class/function names here are U+FF08 FULLWIDTH LEFT PARENTHESIS and U+FF09 FULLWIDTH RIGHT PARENTHESIS since normal parens (U+0028/U+0029) are not allowed in PHP labels., (*4)

Similarly, the customary space is omitted entirely to make this a valid PHP label., (*5)

The Versions

08/10 2017

dev-master

9999999-dev https://github.com/sgolemon/table-flip

Essential exception class needed by every good project.

  Sources   Download

public domain

The Development Requires

exception fun table-flip rage

20/02 2017

1.0.5

1.0.5.0 https://github.com/sgolemon/table-flip

Essential exception class needed by every good project.

  Sources   Download

public domain

The Development Requires

exception fun table-flip rage

01/06 2016

1.0.4

1.0.4.0 https://github.com/sgolemon/table-flip

Essential exception class needed by every good project.

  Sources   Download

public domain

The Development Requires

exception fun table-flip rage

26/05 2016

1.0.0

1.0.0.0 https://github.com/sgolemon/table-flip

Essential exception class needed by every good project.

  Sources   Download

public domain

exception fun table-flip rage