I think you'll need to use the modules folder.
A module is like a mini Kohana application, for example, a simple module might have
/modules/first_module/...
config/
classes/controller/
classes/model/
views/
However if that isn't what you want, just follow the same directory structure above under the application
folder.
Update
Okay, so if you want a book set of controllers, you may lay it out like so (if you wanted them in sub folders)... (example only...)
controllers/books/base.php
class Controller_Books_Base extends Controller {
}
controllers/books/fiction.php
class Controller_Books_Fiction extends Controller_Books_Base {
}
And a route like so in bootstrap.php
Route::set('books_fiction', 'fiction-books/<action>/<id>', array('action' => '(create|read|update|delete)', 'id' => '\d+')
->defaults(array(
'controller' => 'Books_Fiction'
));
Some example classes for Books and Authors.
class Model_Book {
// crud functions
}
class Model_Author {
// crud functions
}
class Controller_Book {
public function view($id) {
$book = Model::factory('Model_Book')->get($id);
$this->template->bookDetails = $book;
}
}
That will hopefully get you started.
alex
2010-03-07 11:47:48