You are here: Re: php 5 classes: public, protected and private « PHP Programming Language « IT news, forums, messages
Re: php 5 classes: public, protected and private

Posted by Jerry Stuckle on 12/01/06 12:57

Tony Marston wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:DuWdndxBr5xeRfPYnZ2dnUVZ_vidnZ2d@comcast.com...
> < snip>
>
>>>>>>The PHP interface defines a set of methods (function) which are
>>>>>>required by the classes which implement the interface. Java is similar
>>>>>>in that respect. But both are a subset of the total interface.
>>>>>
>>>>>
>>>>>It is possible to access the method directly without an interface,
>>>>>therefore an interfae is not necessary.
>>>>>
>>>>
>>>>"Possible" != "CORRECT"
>>>
>>>
>>>That's just your opinion. Where does it say that I *MUST* define and use
>>>an interface before I can access a class method? Interfaces are optional
>>>(especuially in PHP) so it is not wrong to excercise the option NOT to
>>>use them. I can define a class method and access that method without
>>>using an interface, and that is what I choose to do.
>>>
>>
>>When are you going to get it through that pea-sized mind of yours that a
>>PHP interface is not the same as an interface as defined in OO terms?
>>
>>In OO terms, a public method is part of the interface. The PHP keyword
>>interface just defines a set of functions which must be implemented by the
>>class.
>>
>>They are two entirely different things.
>
>
> The fact that a method and an interface are different things is irrelevant.
> I am just pointing out that in PHP an interface is not necessary as I can
> access the method directly without going through an interface. Is this
> statement true or false?
>

No, the fact that they are different are VERY RELEVANT. The fact you
can't understand the difference is also VERY RELEVANT. Or is it just
that you disregard facts which don't support with your stupidness?

Losing the argument so you need to disregard the facts? Typical troll
behavior.

Whether or not a PHP interface is required is immaterial - we are
talking about the OO concept of an interface, not PHP interfaces.

But that's way too deep for you to understand - the same word having
different meanings in different contexts? Hope your head didn't explode.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация