The Plain Old PHP Object - Popo

After severals years of research, I was finally able to adapt some concepts of the Java World to my beloved PHP Scripts.
The first concept I sucessfully translated to the world of scripting languages was the so called "Plain Old Java Object".

Basically the idea behind this concept, as I understand it is to find a new denomination for some old shit. Thus it sounds more relevant!

Here is a complete code you need to implement this astonishing new concept even in your existing PHP-Code.

code example (protected by copyright and my army of lawyers!) <?php
  interface Popo {

  }
?>

After implementing this revolutionary interface into your code, you will be able to implement into your existing value objects like this:

code example (protected by copyright and my army of lawyers!) <?php
  class ValueObject implements Popo {
    private $SomeValue;

  public function setSomeValue ( $SomeValue ) {
    $this->SomeValue = $SomeValue;
  }

  public function getSomeValue () {
    return $this->SomeValue;
  }

  }
?>

Belive it or not, that's just it! You can use the above code as much as you want. Feel free to suite to your needs, but don't forget to put some copyright notice in it that praises ma as new messias of coding!

back to overview for donation