Atomik Framework 2.1 Manual

Table of Contents

1. Introduction
2. Core principles
Simplicity and the KISS principle
Ready to run
Actions and Views
Extensibility and Plugins
3. Installation
More about the directory structure
4. The global store
Accessing the store
Using paths in keys
Using accessors with any array
5. Configuration
Custom directory structure
Pre and post dispatch files
Custom error pages
The session
6. URLs
Calling an action
Routing urls
Creating routes
Retrieving route parameters
Building urls with Atomik::url()
7. Actions and views
Controlling views
View's filename extension
Do not render the view from the action
Using a custom rendering engine
Calling actions or views programmatically
Executing actions
Rendering views and files
8. Selectors
9. Includes
10. Utilities
Redirections and 404 errors
Escaping text
Make friendly urls
Flash messages
Filtering and validating data
Managing paths
11. Error handling and debugging
Handling errors
12. Events
Listening to events
Firing events
Events naming convention
Overview of available Atomik events
13. Plugins
Using plugins
Installing a plugin
Activating and configuring a plugin
Developing plugins
The plugin file
Plugin's custom configuration
Using a class
Loading plugins programmaticaly
Plugin's assets

List of Figures

3.1. The default directory structure
5.1. The default configuration for directories
7.1. A little schema to sum up!
12.1. Simple schema illustrating Atomik events flow

List of Examples

4.1. Using the get method
4.2. Using the set method
4.3. Using the add method
4.4. Using the has and delete methods
4.5. Using paths
4.6. Using paths when setting values
4.7. Using accessors with any array
5.1. Exemple bootstrap.php file
5.2. Accessing the session from the global store
6.1. Simple route
6.2. A route with some parameters
6.3. A route with some parameters
6.4. Building simple urls
6.5. Building urls with parameters
6.6. Building urls with embedded parameters
7.1. A php script, the old way
7.2. Splitting into multiple files
7.3. Private variables in actions
7.4. Example view
7.5. Example layout
7.6. Using a custom rendering engine
7.7. Calling an action programmatically
7.8. Rendering a view programmatically
8.1. Using the built-in selector
8.2. Using the selector provided by the Db plugin
9.1. Using includes
9.2. Including classes with their name
10.1. Redirecting
10.2. Trigerring a 404 error
10.3. Escaping text
10.4. Escaping text using different profiles
10.5. Make an url friendly string
10.6. Creating flash messages
10.7. Retreiving flash messages
10.8. Filtering data
10.9. Filtering arrays
10.10. Using Atomik::path() with paths
10.11. Using Atomik::path() to find files
11.1. Using Atomik::debug()
12.1. Listening to an event
12.2. Listeners with priorities
12.3. Listeners with priorities and importance
12.4. Firing events
12.5. Callback results after firing events
12.6. Example of event naming
13.1. Activating a plugin
13.2. Plugin with custom configuration
13.3. Retrieving plugin custom configuration
13.4. Plugin class
13.5. Plugin class with event callback methods
13.6. Loading a plugin at runtime
13.7. Loading a plugin at runtime with some configuration
13.8. Checking if a plugin is already loaded
13.9. More advance use of Atomik::loadPlugin()
13.10. Using Atomik::pluginAsset()

The manual is licensed under the Creative Commons Attribution 3.0 License.

The manual is targeted to Atomik 2.1.