For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2004 > dataobject model class









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author dataobject model class
Jerry

2004-06-24, 1:22 am

Good morning,

I'm working with a tool who manage several web site. Every site has a
directory corresponding to his database. But several web-sites have the same
features (like a file manager for exemple) . When I do an update on a
data-object classe, I must copy the same file on every directory.

site1 :
file.php
filecategory.php
category.php...

site2 :
file.php
filecategory.php
category.php...

.....
Does exist a solution for doing update a time ?? but I wouldn't use a
extending classe.

Thank you for advance !
Justin Patrin

2004-06-24, 1:22 am

Jerry wrote:

> Good morning,
>
> I'm working with a tool who manage several web site. Every site has a
> directory corresponding to his database. But several web-sites have the same
> features (like a file manager for exemple) . When I do an update on a
> data-object classe, I must copy the same file on every directory.
>
> site1 :
> file.php
> filecategory.php
> category.php...
>
> site2 :
> file.php
> filecategory.php
> category.php...
>
> ....
> Does exist a solution for doing update a time ?? but I wouldn't use a
> extending classe.
>
> Thank you for advance !


You say you won't use an extending class. Why not? If you made a class
that extends DB_DataObject, then make the FileManager classes extend
that one, you'd be fine. Even when you use createTables.php again, the
special extend should still stay there (unless you specify overwriting
it in your DataObject.ini).

Other than that, you could write a simple shell script (or PHP CLI
script :-) to copy the file to all of the places you need it to be. Or
you could write a simple script to run createTables.php on all of the
databases.

--
paperCrane <Justin Patrin>
Jerry

2004-06-24, 3:55 pm

thank you for your response ! but I would like avoid to create a extending
classe because I'll have change all the call !

Thank you

"Justin Patrin" <papercrane@reversefold.com> a écrit dans le message de
news: 20040623155205.76473.qmail@pb1.pair.com...
> Jerry wrote:
>
same[color=darkred]
>
> You say you won't use an extending class. Why not? If you made a class
> that extends DB_DataObject, then make the FileManager classes extend
> that one, you'd be fine. Even when you use createTables.php again, the
> special extend should still stay there (unless you specify overwriting
> it in your DataObject.ini).
>
> Other than that, you could write a simple shell script (or PHP CLI
> script :-) to copy the file to all of the places you need it to be. Or
> you could write a simple script to run createTables.php on all of the
> databases.
>
> --
> paperCrane <Justin Patrin>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com