From: Augusto Flavio on
Hi,


I want to know which file name is appropriate for a interface. Today, for a
PHP class I use: NAME.class.php. What about a interface? Is there a
definition about it ?





Thanks



Augusto Morais
From: =?UTF-8?Q?Hans_=C3=85hlin?= on
*.api
Application Programming Interface
http://en.wikipedia.org/wiki/Application_Programming_Interface

**********************************************
Hans Åhlin
Tel: +46761488019
icq: 275232967
http://www.kronan-net.com/
irc://irc.freenode.net:6667 - TheCoin
**********************************************



2010/7/8 Augusto Flavio <aflavio(a)gmail.com>:
> Hi,
>
>
> I want to know which file name is appropriate for a interface. Today, for a
> PHP class I use: NAME.class.php. What about a interface? Is there a
> definition about it ?
>
>
>
>
>
> Thanks
>
>
>
> Augusto Morais
>
From: Ashley Sheridan on
On Thu, 2010-07-08 at 04:00 +0200, Hans Åhlin wrote:

> *.api
> Application Programming Interface
> http://en.wikipedia.org/wiki/Application_Programming_Interface
>
> **********************************************
> Hans Åhlin
> Tel: +46761488019
> icq: 275232967
> http://www.kronan-net.com/
> irc://irc.freenode.net:6667 - TheCoin
> **********************************************
>
>
>
> 2010/7/8 Augusto Flavio <aflavio(a)gmail.com>:
> > Hi,
> >
> >
> > I want to know which file name is appropriate for a interface. Today, for a
> > PHP class I use: NAME.class.php. What about a interface? Is there a
> > definition about it ?
> >
> >
> >
> >
> >
> > Thanks
> >
> >
> >
> > Augusto Morais
> >
>


In that case, *.api.php. You shouldn't ever give PHP a non-PHP
extension, as all it takes is for a little mis-configuration and your
PHP code is open to the world to view. Easier to keep a consistent
filename in your app than guarantee someone doesn't make a mistake
setting up the server.

Thanks,
Ash
http://www.ashleysheridan.co.uk


From: shiplu on
I use naming convention for interface.

If an object can be cached, I create an interface I+Cache+able = ICachable.

So a sample class would be named as ASampleClass.php
And the Interface would be ICachable.php

This is a well known interface naming convention.

Shiplu Mokadd.im
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)