Borrow Wordpress hooks (add_filter, add_action, apply_filters...). When implementing this code, you should be able to use Wordpress hooks functionality in your own application.
- Add the files to your project
- Create filters or actions the same way you doing in Wordpress
- Apply filters or execute actions.