RE: [PHP-PEAR] RCS tags

[email protected] ("Colin Viebrock")
Newsgroups php.pear
Message-ID <[email protected]>
> > 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.