Kohanaのautoload
Kohanaは情報が少ないのでCodeIgniterのサイトから情報を収集しているのだけれどやっぱりちょっと違う部分もある。
それでちょっと悩んだのがautoload。
autoloadとはクラス(機能)の自動読み込み。これを利用すると、毎回loadメソッドを呼び出す必要がない。
CodeIgniterの場合はapplication/config/autoload.phpで設定を行う。
Kohanaではconfig.phpのautoloadに設定するっぽい。
設定内容はこんな感じ
application/config/config.php
$config = array
(
’site_domain’ => ‘localhost/’,
’site_protocol’ => ‘http’,
‘index_page’ => ‘index.php’,
‘url_suffix’ => ‘.html’,
[…]
Posted on 2月 3rd, 2008 by t
Filed under: Kohana, PHP | No Comments »
