Re: class? package?

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

 



On Thu, Jun 12, 2008 at 3:01 PM, Iv Ray <pobox@xxxxxxxxxxxxx> wrote:

> Shelley wrote:
>
>> Probably you have noticed this:
>> The classes in a package are reused together. If you reuse one of the
>> classes in a package, you reuse them all.
>> If that's the case, then why not just use one class as one package?
>> What's the point of splitting a package into several classes? :-(
>>
>
> I think somebody already answered.
>
> It is actually up to you.
>
> My grandmother used to write letters starting with a capital letter,
> writing the whole letter as one long sentence and ending with a dot. This
> would perhaps confuse most high school teachers, but in her case it somehow
> worked :)
>
> If we take this worn out example - if you have a class "dog" and a class
> "cat" - it becomes quite clear why you need several classes. You can put
> them in a package called "animals" - but as other people already noted, the
> "packages" in php have only a symbolic role, just for clarity of code
> organization.
>
Yeah, that's it.



-- 
Regards,
Shel

[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