You are here: Re: PHP5 - Object « PHP Programming Language « IT news, forums, messages
Re: PHP5 - Object

Posted by Oliver Grδtz on 10/15/07 21:07

Jerry Stuckle schrieb:
> Oliver GrΓ€tz wrote:
>> $topping2 = new withExtraTopping($topping1);
>> $total = $topping2->getPrice();
>> print $total;
>>
>> Where's the problem, it's a simple decorator example.
>>
>> OLLi
>>
>
> Several things.
>
> What's the difference between an object of class withExtraTopping and
> $topping1?
>
> What is the price of $topping2? Every pizza place I know charges more
> for the same topping on a larger pizza.
>

Changing the concept is out of scope here. I simply ANSWERED the
question asked by the original poster. Changing the price of extra
toppings and making the price dependent on the pizza size was NOT part
of the question.

OLLi

--
X:"I was working hard for that money."
S:"And I didn't?"
X:"You stole it."
S:"And you're making it very hard work"
[Buffy 514]

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация