P.S.
This also fixes
Person::find_or_create_by_name_and_id(array('name' => 'Tito', 'id' => 1));
Which I don`t think was working.
I handle that here in not the greatest way:
if(count($args) == 1 && is_array($args0) && count(array_filter(array_keys($args0), 'is_string')))
I`m new to php coming from actionscript/java so if you see a better way, please
Subject: Please consider this
Hello,
I`m new here so first of all, great job on this, it`s quite powerful.
What I had in mind was:
find_by_username_or_useremail_or_create_by_username_and_password_and_useremail (
array(
'username'=>'the girl next door'
'password'=>'is home alone'
'useremail'=>''
));
My way:
if (substr($method,0,7) === 'find_by') {
$attributesCreate = $attributesFind = $attributes = substr($method,8);
$argsCreate = $argsFind = $args;
P.S.
This also fixes
Person::find_or_create_by_name_and_id(array('name' => 'Tito', 'id' => 1));
Which I don`t think was working.
I handle that here in not the greatest way:
if(count($args) == 1 && is_array($args0) && count(array_filter(array_keys($args0), 'is_string')))
I`m new to php coming from actionscript/java so if you see a better way, please
Alin