forked from klederson/phpburn
-
Notifications
You must be signed in to change notification settings - Fork 5
Spices Module
klederson edited this page Nov 26, 2010
·
2 revisions
SPICES is something like an apt-get or a gems ( rails ).
Now in PhpBURN you can use third part SPICES using Spices Module
Just like another module you can choose to use spices by its own or in combination with other modules ( Model, Views, Controller ).
To add Spices in applications genereted by a PhpBURN older than b1.0.2 you should do this:
Go to PhpBURN Official Repository for more informations.
<?php
namespace PhpBURN\Spices;
################################
# Spices Configuration
################################
\PhpBURN::load('Spices');
Spices::loadSpice();
?>system/config/spices/
<?php
define('SYS_SPICES_PATH', SYS_APPLICATION_PATH . DS . 'config' . DS . 'spices' . DS);
define('SYS_SPICES_EXT','spices.php',true); <?php
# Spices
PhpBURN::loadModule('Spices');WORKING ON IT
You simply add your spice configuration file into system/config/spices/
Example for rawtest spice:
system/config/spices/rawtest.spices.phpWith it's configuration content
<?php
PhpBURN_ControllerConfig::addOnCallActionBefore(
'phpburn_spice_rawtest',
function($action, $parms) {
var_dump($action, $parms)
}
);And then check it out, open your controller and see what you get on screen