RE: [PHP-PEAR] RCS tags
| From: | Colin Viebrock | Date: | Thu, 08 Feb 2001 15:50:56 +0000 |
| Subject: | RE: [PHP-PEAR] RCS tags | ||
| References: | 1 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-1301@lists.php.net to get a copy of this message | ||
> > Even better would be to require something like:
> >
> > <?php
> > class myPearClass {
> > var $_VERSION = "$Id";
> > ...
> > }
> > ?>
> >
> > .. which I think one of the Pear modules is already doing.
>
> I like this idea.
Me too ... :)
Except I'm going to suggest a different variable name before people
say $_VERSION isn't good.
$_RCS_ID perhaps?
$_VERSION could be reservered for the release number of your class
(i.e. "this is the 2.0 version of my Crypt::CBC class"). In fact,
if we insist that people use this, it makes things like this easier
and standard across classes:
<?php
$foo = new MyPearClass;
if ($foo->_VERSION < 2.0) {
die ("This script requires MyPearClass 2.0 or higher.");
}
...
?>
--
Colin Viebrock
Co-Founder, easyDNS Technologies
http://www.easyDNS.com/