Flexible authorization library for PHP