Object Orient PHP Question
Posted: Wed Oct 03, 2007 5:02 pm
feyd | Please use
Essentially,
I suppose I am asking if I pass objects in as arguments to a class?
Thanks,
~Eric
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello,
I am designing a class that gets some information from a cluster of servers.
I have a class already that can obtain information from a single Server Object, but I want to be able to group some servers and call it a Cluster. Since PHP does not allow for overloading how can I implement this where the number of servers within a cluster can be any number instead of a fixed amount?Code: Select all
//This creates a new server object
$server = new Server("$a_arg1","a_arg2","a_arg3");
//I want to create a cluster of servers
$cluster = new Cluster($server1, $server2, $serverN);I suppose I am asking if I pass objects in as arguments to a class?
Thanks,
~Eric
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]