Repository navigation
Home
There are many PHP frameworks and libraries out there. Many - if not all - implement some sort of routing system, a generic MVC ( Model-View-Controller ) pattern, dependency injection containers or service locators, some add thing like 'bundles' or 'extensions', etc.
All this is not in ARC. For one because you can get it almost everywhere else if you really need it, but more importantly it complicates things that should be really simple.
ARC is far from finished, if you want to help, please see the Roadmap for a list of things left to do. The documentation is far from complete, but you can also check the documentation at Ariadne-CMS, although the syntax used there is different from ARC.
You can use ARC in its entirety or just the component you need. Components are designed to be usable independent of the whole, except for a very few basic tools. Mostly these are the \arc\path component and the \arc\context component.
To use ARC, either clone it, download it or (soon) use composer to get it (it is not yet added to packagist, since its in very early stages). Put it anywhere in your applications directory structure and use any PSR-0 compliant autoloader or require_once the included autoload.php script. e.g.
Then just call the factory methods, (soon to be) documented in the pages below, e.g:
$result = \arc\events::fire('myEvent', array( 'extra' => 'Information' ) );
if ( $result ) {
// do default action for myEvent
}
This is a set of classes and methods to ease some often needed tasks for which the normal PHP methods are either complex, verbose or sometimes difficult to use correctly.
- path: utility methods to parse paths, normalize them to absolute paths, etc.
- url: class to ease parsing and creation of accessible and safe url's.
- http: simple http client.
- xml: dom based xml parsing, with a simple_xml like syntax
- html - soon to come
These are basic Ariadne functionalities refactored to decoupled and reusable components. The most important difference between these and similar components in other libraries is the basic support for filesystem like structuring of your application content and configuration. e.g. The event system allows events to be fired and listened to on a specific path and events will bubble up and trickle down a path. Configuration settings can be changed per path and settings will trickle down to child paths. This is a basic idiom in Ariadne, similar to what Zope ( a python CMS ) calls 'acquisition'.
- context: a simple stack system that allows you to change settings for a specific context and revert them after.
- cache: generic caching system and caching proxy for any other object.
- config: a configuration management system that implements acquisition.
- events: W3C style events, with a path or filesystem based capture/listen model.