<?php Atomik::set(array('base_dir' => 'C:\\wamp\\www\\responsive-newsletter-maker-V3', 'plugins' => array('DebugBar' => array('include_vendors' => 'css'), 'Errors' => array('catch_errors' => true), 'Session', 'Flash', 'Controller', 'Db' => array('dsn' => 'mysql:host=localhost;dbname=newsletter_maker', 'username' => 'root', 'password' => '')), 'atomik' => array('url_rewriting' => true, 'debug' => true, 'model_dirs' => 'app/models'), 'language' => array('autodetect' => false), 'app' => array('layout' => '_layout', 'language' => 'fr', 'routes' => array('templates' => array('@name' => 'default', 'action' => 'Templates/default/index'), 'newsletter/:issue' => array('action' => 'templates/newsletter/index'), 'flash/:issue' => array('action' => 'templates/flash/index'), 'topfive/:issue' => array('action' => 'templates/topfive/index'), 'rh/:issue' => array('action' => 'templates/rh/index'), 'issues' => array('@name' => 'default', 'action' => 'Issues/default/index'), 'create/:template/audio' => array('action' => 'issues/audio/index'), 'create/:template/biologiste' => array('action' => 'issues/biologiste/index'), 'create/:template/nutrition' => array('action' => 'issues/nutrition/index'), 'create/:template/audiologyIT' => array('action' => 'issues/audioit/index'), 'create/:template/audiologyBR' => array('action' => 'issues/audiobr/index'), 'create/:template/audiologyDE' => array('action' => 'issues/audiode/index'), 'create/:template/audition' => array('action' => 'issues/audition/index'), 'create/:template/audiologyWN' => array('action' => 'issues/audiologywn/index'), 'create/:template/audioenportada' => array('action' => 'issues/audioes/index'), 'create/:template/pharma' => array('action' => 'issues/pharma/index'), 'create/:template/dentaire' => array('action' => 'issues/dentaire/index'), 'create/:template/audiology' => array('action' => 'issues/audiology/index')))));
<?php Atomik::set(array('app/layout' => '_layout', 'styles' => array('assets/css/main.css'), 'scripts' => array())); /*This is where the database configuration is done. The default is a database called "coolcars" with an user named "webapp", but these can be changed for different deployments*/ Atomik::set('plugins/Db', array('dsn' => 'pgsql:host=localhost;dbname=coolcars', 'username' => 'webapp', 'password' => ''));
<?php Atomik::set(array('plugins' => array('Db' => array('dsn' => 'sqlite:example.db'), 'Session', 'Flash', 'Errors' => array('catch_errors' => true)), 'atomik.debug' => true, 'app.layout' => '_layout'));
public function offsetSet($key, $value) { return Atomik::set($key, $value); }
<?php /* This script fetches the cars from database, shuffles the result and picks the two topmost ones to display on the page */ $carresult = A('db:carselection'); $allcars = $carresult->fetchAll(); shuffle($allcars); $leftcar = $allcars[0]; $rightcar = $allcars[1]; Atomik::set('scripts', array_merge(Atomik::get('scripts'), array('assets/js/create_selection_form.js')));
Atomik::set(array( /* @var array */ 'plugins' => array(), /* @var array */ 'atomik' => array( /* Atomik's filename * @var string */ 'scriptname' => __FILE__, /* Base url, set to null for auto detection * @var string */ 'base_url' => null, /* Whether url rewriting is activated on the server * @var bool */ 'url_rewriting' => false, /* @var bool */ 'debug' => false, /* The GET parameter used to retreive the action * @var string */ 'trigger' => 'action', /* Whether to register the class autoloader * @var bool */ 'class_autoload' => true, /* @var bool */ 'start_session' => true, /* Plugin's assets path template. * %s will be replaced by the plugin's name * @see Atomik::pluginAsset() * @var string */ 'plugin_assets_tpl' => 'app/plugins/%s/assets/', /* @var array */ 'log' => array( /* @var bool */ 'register_default' => false, /* From which level to start logging messages * @var int */ 'level' => LOG_WARNING, /* Message template for the default logger * @see Atomik::logToFile() * @var string */ 'message_template' => '[%date%] [%level%] %message%' ), /* @var array */ 'dirs' => array( 'app' => ATOMIK_APP_ROOT, 'plugins' => array(ATOMIK_APP_ROOT . '/modules', ATOMIK_APP_ROOT . '/plugins/'), 'actions' => ATOMIK_APP_ROOT . '/actions/', 'views' => ATOMIK_APP_ROOT . '/views/', 'layouts' => array(ATOMIK_APP_ROOT . '/layouts', ATOMIK_APP_ROOT . '/views'), 'helpers' => ATOMIK_APP_ROOT . '/helpers/', 'includes' => array(ATOMIK_APP_ROOT . '/includes/', ATOMIK_APP_ROOT . '/libraries/'), 'overrides' => ATOMIK_APP_ROOT . '/overrides/' ), /* @var array */ 'files' => array( 'index' => 'index.php', 'config' => ATOMIK_APP_ROOT . '/config', // without extension 'bootstrap' => ATOMIK_APP_ROOT . '/bootstrap.php', 'pre_dispatch' => ATOMIK_APP_ROOT . '/pre_dispatch.php', 'post_dispatch' => ATOMIK_APP_ROOT . '/post_dispatch.php', '404' => ATOMIK_APP_ROOT . '/404.php', 'error' => ATOMIK_APP_ROOT . '/error.php', 'log' => ATOMIK_APP_ROOT . '/log.txt' ), /* @var bool */ 'catch_errors' => false, /* @var bool */ 'display_errors' => true, /* @var array */ 'error_report_attrs' => array( 'atomik-error' => 'style="padding: 10px"', 'atomik-error-title' => 'style="font-size: 1.3em; font-weight: bold; color: #FF0000"', 'atomik-error-lines' => 'style="width: 100%; margin-bottom: 20px; background-color: #fff;' . 'border: 1px solid #000; font-size: 0.8em"', 'atomik-error-line' => '', 'atomik-error-line-error' => 'style="background-color: #ffe8e7"', 'atomik-error-line-number' => 'style="background-color: #eeeeee"', 'atomik-error-line-text' => '', 'atomik-error-stack' => '' ) ), /* @var int */ 'start_time' => time() + microtime() ));
Atomik::set(array ( 'app' => array ( 'layout' => '_layout', 'default_action' => 'index', 'views' => array ( 'file_extension' => '.phtml', ), ), 'atomik' => array ( 'start_session' => true, 'class_autoload' => true, 'trigger' => 'action', 'catch_errors' => true, 'display_errors' => true, 'debug' => true, ), 'styles' => array ( 0 => 'assets/css/main.css', ), 'plugins' => array ( 0 => 'Cache', 1 => 'Db', ), 'scripts' => array ( ), ));