Login | Register
My pages Projects Community openCollabNet

Reply to message

* = Required fields
* Subject
* Body
Send reply to
Author (directly in email)
Please type the letters in the image above.

Original message

Author Sven Tietje <tietje@topconcepts.de>
Full name Sven Tietje <tietje@topconcepts.de>
Date 2006-10-04 08:06:19 PDT
Message Hans Lellelid wrote:
> Isn't Sven saying that FETCH_INTO will keep memory/resource use to a
> minimum? (Unlike current situation where you would have a new object
> allocated for each row returned.)

Yes, just would need the options of one single instance for the output of
data. Doing it with hydrate or FETCH_INTO -> that doesn`t matter.


Class BasePerson {
    public function getName() {


    public function getFirstname() {


Now, i wanna publish a List of Person with their fullnames. I don`t want to
change data or something -> just want to print table containting the
fullname and some columns additional information. I`ll implement a method
getFullname in my Object-Class:

Class Person extends BasePerson {
    public function getFullname() {
        return $this->getFirstname() . ' ' . $this->getName();

Why get an instance of each object?

I mentioned it already:
One object instance should be an option!!! A single instance for each object
should be set by default.

Greets sven