Skip to content

Ariadne-CMS/arc-events

Repository files navigation

ARC: Ariadne Component Library

Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

A flexible component library for PHP

The Ariadne Component Library is a spinoff from the Ariadne Web Application Framework and Content Management System [ http://www.ariadne-cms.org/ ]

arc/events contains

  • events: W3C style event system, with a filesystem tree as the DOM

Example code:

    \arc\events::cd('/foo/')->listen( 'onbeforesave', function( $event ) {
        return $event->preventDefault(); // don't allow saves in /foo/
    });

    $eventData = \arc\events::cd('/foo/bar/')->fire( 'onbeforesave' );
    if ( $eventData ) {
         // save something, but alas - it has been prevented by a listener
    }