11-17-2007, 01:10 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Nov 2007
Posts: 32
Thanks: 5
|
Class inside a class(?)
Hey all, I have a question for you.
I Have one class, lets call it for example "table". inside that class I want to insert another class, for example "columns".
but I don't need the "columns" class outside of the "table" class, only inside it, and only 1 columns class will be needed within a table class.
PHP Code:
//Good code :
$table = new table();
$table->columns->add("asdf");
//Bad code :
$columns = new columns();
$columns->add("asdf");
How can i do that? thanks.
|
|
|