Re: [PHP] Copying an Object

2010-09-22 Thread Peter Lind
On 23 September 2010 02:14, Daniel Kolbo wrote: *snip* > On 9/22/2010 9:11 AM, chris h wrote: > Say you have two classes: human and male.  Further, say male extends > human.  Let's say you have a human object.  Then later you want to make > that human object a male object.  This seems to be a pr

Re: [PHP] Copying an Object

2010-09-22 Thread Daniel Kolbo
On 9/22/2010 9:11 AM, chris h wrote: > > You could create a method of class B that takes an object of class A as > a parameter and copies each property line by line (or method of class A > that takes an object of class B...). If you don't want to add a method > you could just do the same thing, b

Re: [PHP] Database Administration

2010-09-22 Thread Bastien Koert
On Wed, Sep 22, 2010 at 4:35 PM, Tom Barrett wrote: > Hmm.. > > I am familiar with PMA. I would for the purpose of this project consider it > too technical for the target user base. The point is to create a GUI layer > that would manage these things. > > For example, the 'add client' screen would

Re: [PHP] Database Administration

2010-09-22 Thread Tom Barrett
Hmm.. I am familiar with PMA. I would for the purpose of this project consider it too technical for the target user base. The point is to create a GUI layer that would manage these things. For example, the 'add client' screen would ask for four things; name, description, username and password. Th

Re: [PHP] ZipArchive, but without files

2010-09-22 Thread Carlos Medina
Am 22.09.2010 17:32, schrieb Jonathan Mills: On 22/09/2010 12:11, Viacheslav Chumushuk wrote: Hello. As I understand you in a right way you need next function http://ua.php.net/manual/en/function.gzcompress.php Thanks for the suggestion Viacheslav , but I'd trying to the create the complete z

Re: [PHP] ZipArchive, but without files

2010-09-22 Thread Jonathan Mills
On 22/09/2010 12:11, Viacheslav Chumushuk wrote: > Hello. > As I understand you in a right way you need next function > http://ua.php.net/manual/en/function.gzcompress.php Thanks for the suggestion Viacheslav , but I'd trying to the create the complete zipfile structure, gzcompress() just compre

[PHP] Re: Copying an Object

2010-09-22 Thread Carlos Medina
Am 22.09.2010 13:35, schrieb Daniel Kolbo: Hello PHPers, I have: class A { ...code } class B extends A { ...code } $a = new A(); $b = new B(); I would like to get all of the properties of $a into $b by value. Class A extends 3 other classes. I would like a way to not have

Re: [PHP] Copying an Object

2010-09-22 Thread Nathan Nobbe
On Wed, Sep 22, 2010 at 5:35 AM, Daniel Kolbo wrote: > Hello PHPers, > > I have: > > class A { >...code > } > > class B extends A { >...code > } > > $a = new A(); > > $b = new B(); > after looking back over your situation, which looks strange, why not use composition at this leve

Re: [PHP] Copying an Object

2010-09-22 Thread Nathan Nobbe
On Wed, Sep 22, 2010 at 5:35 AM, Daniel Kolbo wrote: > Hello PHPers, > > I have: > > class A { >...code > } > > class B extends A { >...code > } > > $a = new A(); > > $b = new B(); > > I would like to get all of the properties of $a into $b by value. first off you have to be car

Re: [PHP] Copying an Object

2010-09-22 Thread chris h
You could create a method of class B that takes an object of class A as a parameter and copies each property line by line (or method of class A that takes an object of class B...). If you don't want to add a method you could just do the same thing, but procedurally. The issue with this (aside fro

Re: [PHP] Copying an Object

2010-09-22 Thread mr bungle
Maybe statics members can help you with this ... On Wed, Sep 22, 2010 at 07:35, Daniel Kolbo wrote: > Hello PHPers, > > I have: > > class A { >...code > } > > class B extends A { >...code > } > > $a = new A(); > > $b = new B(); > > I would like to get all of the properties of $a

[PHP] Copying an Object

2010-09-22 Thread Daniel Kolbo
Hello PHPers, I have: class A { ...code } class B extends A { ...code } $a = new A(); $b = new B(); I would like to get all of the properties of $a into $b by value. Class A extends 3 other classes. I would like a way to not have to manage a 'copy' method in B if A or one of

Re: [PHP] ZipArchive, but without files

2010-09-22 Thread Viacheslav Chumushuk
Hello. As I understand you in a right way you need next function http://ua.php.net/manual/en/function.gzcompress.php On Wed, Sep 22, 2010 at 10:16:30AM +0100, Jonathan Mills wrote: > Is it possible to create a ZipArchive to a non-file storage, eg string? > > I want to create a small zip of som

[PHP] ZipArchive, but without files

2010-09-22 Thread Jonathan Mills
Is it possible to create a ZipArchive to a non-file storage, eg string? I want to create a small zip of some data, and then load it into a database. I don't need the intermediate file. I tried various filters, and I can READ a zip archive with the "data://" wrapper, but haven't found any way of