Archive

Archive for May, 2009

quick import constructor

May 12th, 2009 No comments

This snipplet shows how to automatic import parameters into a class, restricted to the variables defined in the head of the class.

class Demo
{
  var $a, $b, $c
 
  function Demo($data)
  {
    while(list($key,$value)=each($data)){
      if(isset($this->$key)){
        $this->$key = $value;
      }
    }
  }
}

Finally… Hello world!

May 12th, 2009 No comments

Finally I managed to set up a blog. This will be the place where I publish some snipplets and hints concerning the IT stuff I deal with. The contents may vary from programming-code to geek-stuff like the IPhone.

The main reason to start this blog is to archive all the stuff I create and periodically loose due to my not-existing self-organization. :-)