Aspects can be hooked to fixed join points.
It uses the
include directive of PHP:// here is a fixed join point@include("auth.php")// if the aspect auth.php exists, it is executed, otherwise nothing failsWell, the cool thing is just the @ directive of PHP, that catches the Warning, and the looseness of the
include directive, which just throws a warning (and not an error).There is an implicit semantics in the file name included. For instance, in the example above, the auth.php file may contains some authentification mechanisms.
Known aspects are:
authentification:
@include("auth.php") (an implementation is simplephpauth)logging:
@include("log.php") (an implementation is phpmodlog)live debugging:
@include("edit.php") (an implementation is livemaintenance)