how to implement plugins or package using PHP or CakePHP
If only there was a whole section of the manual describing how to write your own plugin.