[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Phpgroupware-developers] null return values in sql_entity
From: |
Dirk Schaller |
Subject: |
RE: [Phpgroupware-developers] null return values in sql_entity |
Date: |
Fri, 3 Sep 2004 08:32:31 +0200 |
> >Okay then the contacts backend should use such a class. Outside the
> >backend I couldt handle any error, because there are many db queries
> >in some functions and they handle nothing. They get the null from sql
> >entity and return it. Or sometimes they get it and return
> anything else.
> >And for API classes that isnt the finest way.
> >
> >
> Agreed. I thought this was how it worked. The assertions class was
> made for this. Too bad it wasnt used where it was supposed to be used.
> So, we do need to change it at some point to do this. If i remember
> correctly
> the assertions class was php 4.3 dependant (for some reason i cannot
> remember) and so it wasnt included in the release.
>
> Anyhow, is there a particular problem youre trying to tacle
> or is this just code review?
We often use the contact_sql class for import/export contacts.
I.e. for import a directory of vCards or sync data with pda.
I wrote the ipc_addressbook class as a interface between the
contact_sql class and the ipc layer. Other modules like the
sync module can use this layer. The ipc classes provide a set
of methods for add/get data in various mime types. And in this
case I check some return values, but as you know I got nulls.
So I take a look at the classes to check what happens. So far
I think it was more a code review and in the future we should
find a solution maybe with the assertions class.