Status | Draft |
---|
All functionality from the Config
and Log
classes has moved to the core Kohana
class. See Kohana
Replace these in your code:
Config::item
with Kohana::config
Config::set
with Kohana::config_set
Config::load
with Kohana::config_load
Config::clear
with Kohana::config_clear
Log::add
with Kohana::log
Log::write
with Kohana::log_save
Log::directory
with Kohana::log_directory
site_domain
- Changed. Defaults to kohana/
You may need to change this to a full domain localhost/kohana/
internal_cache
- New. Defaults is FALSE
enable_hooks
- New. Default is FALSE
Moved from config/hooks.php
log_threshold
- New. Default is 1
Moved from config/log.php
log_directory
- New. Default is APPPATH.logs
Moved from config/log.php
preload
- Removed. You need to manually instance any libraries you had listed.prefix
- Removed. connection
- Changed. Parameters are passed as an array with discrete entries. The old DSN
style may still be used.escape
- New. Default is TRUE
Switch query builder automatic escaping on or off._allowed
- Removed.
Note1: Config files config/log.php
and config/hooks.php
are removed. Now configured in core config
media
controller has been removed.
Special Methods _default
and _remap
are replace by _ _call($method, $arguments)
see Controllers
By default, a 404
error will be triggered if a non-existent controller method is called, and _ _call
is defined. You may override this behaviour
in your method.
To simulate _remap
The _call method should be the only method in the controller.
Loader
library has been removed. $this→load('something')
syntax is obsolete and invalid.
Libraries and models must now be created using the following syntax: $example = new Example();
and $example = new Example_Model();
Where possible and applicable, use Factories to instance libraries, and reference library objects via their instance:
$template = View::factory('admin')→set('title', $title')→render();
$myname = Session::instance()→get('myname')
create_links()
method has been renamed to render()