Dmitry Sechin Fri May 20 09:40:03 -0400 2011

Subject: private attributes/methods & small Connection bug

Hi!

Your ActiveRecord implementation is a useful tool, it has almost every thing I need.
You're doing great work, guys!

But there are two things that keep bugging me.
First of all, why you chose to make all not public methods private?
It makes your classes hardly extendable. I changed some of the access modifiers to make my code work.

And the small thing about ActiveRecord\Connection - parse_connection_url works in a strange fashion:

foreach (explode('/&/', $url['query']) as $pair) {
list($name, $value) = explode('=', $pair);
if ($name == 'charset')
$info->charset = $value;
}
...

query could contain information about schema name & maybe some other things, not only charset.

For example I'm using PostgreSQL & rewrote this part to set search_path to proper value.

Anyway, your AR implementation is the best of standalone ones (don't know nothing about big frameworks...)
Thanks!


Yoan B Sun May 22 11:37:20 -0400 2011

Do you mind opening an issue and/or forking it on Github? https://github.com/kla/php-activerecord

I do agree regarding the private vs protected stuff.

Dmitry Sechin Mon May 30 02:28:38 -0400 2011

Yes, I will deal with this think at the end of the week.
I think I will create an issue in main repository.

(1-2/2)