<?php
use Oak\Config\Facade\Config;
Config::set('package', [
'client_id' => '123',
'client_secret' => 'F1jK4s5mPs9s1_sd1wpalnbs5H1',
]);
echo Config::get('package.client_secret'); // F1jK4s5mPs9s1_sd1wpalnbs5H1
php oak config clear-cache
php oak config cache
Documentation coming soon
Documentation coming soon
<?php
use Oak\Cookie\Facade\Cookie;
Cookie::set('key', 'value');
echo Cookie::get('key'); // value
Name | Default |
---|---|
path | / |
secure | false |
http_only | true |
<?php
use Oak\Dispatcher\Facade\Dispatcher;
Dispatcher::addListener('created', function($event) {
echo 'Creation happened!';
});
Dispatcher::dispatch('created', new Event());
Documentation coming soon
<?php
use Oak\Logger\Facade\Logger;
Logger::log('This message will be logged');
Name | Default |
---|---|
filename | cache/logs/log.txt |
date_format | d/m/Y H:i |
<?php
use Oak\Session\Facade\Session;
Session::set('key', 'value');
Session::save();
echo Session::get('key'); // value
Name | Default |
---|---|
path | cache/sessions |
name | oak_app |
cookie_prefix | session |
identifier_length | 40 |