Re: nested objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Actually it is academic intro to OO programing, the overkill html was just helping me understand the concept. Now I can put it to good use :-).


----- Original Message ----- 
From: "Jochem Maas" <jochem@xxxxxxxxxxxxx>
To: "Victor Matherly" <vmatherly@xxxxxxxxxxxxxxxxxxxxxxx>
Cc: php-general@xxxxxxxxxxxxx
Sent: Friday, December 7, 2007 10:20:47 PM (GMT-0500) America/New_York
Subject: Re:  nested objects

Victor Matherly wrote:
> 
> Hello list,
> 
> I want to create a new object and nest the objects variable in an array of another object.   
> I think I am going about it the correct way 


I think you are trying to swat a fly with a nuclear missle. in practice abstracting an HTML
table into a big collection of objects is total overkill (although it might make an interesting
accademic introduction into OO coding)

...

> 
> class htmlTableCell {
>  var $cell_width;
>  var $cell_height;
>  var $cell_colspan;
>  var $cell_rowspan;
>  var $css_class;
>  var $cell_content;
>  var $cell_name;
>  
> 	
> function __construct($content = "&nbsp;"){
> 
>  $this->cell_content = $content; 
>   
> 	
> }// end construct	
> 
> function setContent($content){
>  $this->cell_content = $content;	
> 	
> }//end setContent function
> 
> function setName($name){
>  $this->cell_name = $name;	
> 	
> }//end setContent function
> 
> 
> function getContent(){
>  return $this->cell_content;	
> 	
> }//end setContent function
> 
> } //end TableCell class
> 
> 
> 
> 
> 
> 
> ?>
> 
> 
> 
> 
> 
> 
> Victor J. Matherly
> Technical Services
> Wave Communications, Inc
> http://www.wave-communications.com
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux