Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kohana in the code #2

Open
thejw23 opened this issue Aug 16, 2014 · 3 comments
Open

Kohana in the code #2

thejw23 opened this issue Aug 16, 2014 · 3 comments

Comments

@thejw23
Copy link

thejw23 commented Aug 16, 2014

Example: $config = Kohana::$config->load('database')->$name;

Ohanaze still use Kohana? I thought that this will be separate project, no Kohana dependency (like the website says, dependency free). So Database should use Ohanazee/Config, Ohanazee/Session...

@shadowhand
Copy link
Contributor

Yes, it will get there. First step was to extract the package and make it more Composer friendly. As of right now, the package can be installed with composer and is PSR-0 friendly, which seems like a good place to start refactoring to me.

Patches welcome!

@thejw23
Copy link
Author

thejw23 commented Aug 16, 2014

DB is complicated - I already moved it to PSR-0 and namespace, with use of modified Config and Session. However, I moved away from it not so long ago and go with Aura.SQL and Aura.SQLQuery. Query give me final SQL witch can be used with any PDO library.

Most people will use DB in their own projects, already existing session classes. So Session in DB is not a good idea, only will make a dependency. The Config - I made it simply a reader, no groups, no writing - and it works great. It's one class, easy to put into any project, just set up constatns with paths and config get loaded just like in Kohana (with a use of Filesystem class, based on Kohana methods - so DB has two dependencies).

But I would skip DB for now and focus on releasing Filesystem, Config, I18n/Messages, UTF8, View - small handy utils ready to be used in any project. For me it's better to go with Kohana View in Slim, than use it's build in view functionality.

@thejw23
Copy link
Author

thejw23 commented Aug 18, 2014

Kord has ported DB to PSR-0 and maybe it's worth checking https://github.com/kord-ua/kord/tree/master/modules/database

Brief looking at diff and it seems to be ok, a good start for polishing it and posting as standalone component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants