Action-based event system for PHP