News for hackers. Stuff that matters.
Re:Twitto: A web framework in a tweet by dchest on Friday March 06, 2009 @03:18PM (#505899)
How about (secure?) OO version (with no error handling)?

  $c=new ReflectionClass('co');$m=$c->getMethod($_GET['m']);if($m && $m->isPublic()){$i = $c->newInstance();$m->invoke($i);}
Example usage:

  <?php
  // "Framework"
  $c=new ReflectionClass('co');$m=$c->getMethod($_GET['m']);if($m && $m->isPublic()){$i = $c->newInstance();$m->invoke($i);}

  // Controller
  class co 
  {
  	public function index()
  	{
  	    echo "index!";
  	}
  
  	public function test()
  	{
	    echo "yes, it's test.";  
  	}
  }
  
  ?>
Call:

example.com/?m=index example.com/?m=test

Re:Twitto: A web framework in a tweet by dmoney on Tuesday March 10, 2009 @11:24PM (#511224)
How about (secure?) OO version

Nice. You should call it TwitOO.