You are here: Re: How to specify 'friend' visibility in php « PHP Programming Language « IT news, forums, messages
Re: How to specify 'friend' visibility in php

Posted by Jerry Stuckle on 09/28/02 12:01

Daniel Klein wrote:
> I've got a class that has a couple of methods that can't be 'private' cos
> they can be called by other classes in the project, but they should not be
> called by user code, so I've had to make them 'public'. In other languages
> these methods would have 'friend' visibility.
>
> I suspect there is no 'friend' access modifier since php has no concept of a
> 'module' or 'assembly' (at least none that I am aware of).
>
> I'm use to coding in dynamic languages where you use the 'honor system'. For
> example, in python you indicate this by placing an underscore character in
> front of the method/function. You also document the method to indicate your
> intentions. So unless there is a similar php convention, I am more than ok
> doing it that way.
>
> So my question is: What is the php way of doing this?
>
> Daniel Klein
>

Daniel,

No formal standard like you're thinking; rather a set of informal
standards. The problem is, everyone has their own :-)

--
==================
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

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