-
Notifications
You must be signed in to change notification settings - Fork 11
Config
Devin Smith edited this page Aug 2, 2014
·
13 revisions
Tipsy accesses much of its configuration from a single config object
var_dump($tipsy->config());
echo $tipsy->config()->db->host;
You can set the config in a config file, multiple config files, or at any point durring execution.
$tipsy->config(['view' => [
'path' => 'views',
'layout' => 'awesome-layout'
]]);
// Tell tipsy to read the config file
$tipsy->config('config.ini');
; File located at config.ini
[db]
host=localhost
[view]
path=views
// Tell tipsy to read the config files
$tipsy->config('db.ini');
$tipsy->config('config.ini');
; File located at db.ini
[db]
host=localhost
user=root
pass=root
database=tipsy
; File located at config.ini
[tipsy]
version=0.01
[view]
path=
layout=LayoutTest
// Tell tipsy to read all ini files in config
$tipsy->config('config/*.ini');
- Home
- Getting Started
- Server Config
- Installation
- Installing Composer
- App
- Route Shorthand
- Config
- Routes
- Methods
- Controller Types
- Params & Regex
- Aliases
- Dependency Injection
- Advanced Routing
- Services
- User Defined Services
- Built in Services
- Middleware
- Views
- Templates
- Scope
- Resource
- Factory
- Looper
- Examples
- Plugins
- About