Reputation: 9937
I have been working with php for more than 5 years. Lately I have worked in rubyonrails. I have done a few projects in this very nice framework. What I like best from rails and ruby: they both promote automate test and there are so many rich libs. Rspec and TestUnit are very easy to learn comparing to PhpUnit.
I have to develop a very big project in the next coming month. I am a big fan in cakephp but I realize that cakephp will not meet my project requirement. I am a quick learner. After reading doc from Kohana official website, I will use Kohana for this project.
After having done some search on Kohana, I still have a few topics to concern about
Upvotes: 2
Views: 1169
Reputation: 17725
I can answer only 2 of your questions, still better then nothing ;)
AD2. You can set Kohana::$environment
variable based on the .htaccess (setenv
and getenv
) / $_SERVER
setting:
if (Arr::get($_SERVER, 'SERVER_NAME') !== 'localhost')
{
// We are live!
Kohana::$environment = Kohana::PRODUCTION;
// Turn off notices and strict errors
error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
}
else
{
Kohana::$environment = Kohana::DEVELOPMENT;
error_reporting(E_ALL | E_STRICT);
}
Then you can setup Kohana::init
like this:
Kohana::init(array(
'base_url' => '/',
'caching' => Kohana::$environment === Kohana::PRODUCTION,
'profile' => Kohana::$environment !== Kohana::PRODUCTION,
'index_file' => FALSE,
'errors' => TRUE
));
so your production application will have caching enabled and profiling disabled.
For the modules it's pretty much the same:
if (Kohana::$environment !== Kohana::PRODUCTION)
{
Kohana::modules(array(
'unittest' => MODPATH . 'unittest',
));
}
AD3. Sorry for being laconic - no, there isn't one.
Upvotes: 3