cvs: pear-core /PEAR/PackageFile v2.php
| From: | Greg Beaver | Date: | Wed, 19 Oct 2005 03:32:28 +0000 |
| Subject: | cvs: pear-core /PEAR/PackageFile v2.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-35698@lists.php.net to get a copy of this message | ||
cellog Tue Oct 18 23:32:28 2005 EDT
Modified files:
/pear-core/PEAR/PackageFile v2.php
Log:
lazy load validator class in analyzeSourceCode() if it doesn't exist
http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2.php?r1=1.114&r2=1.115&ty=u
Index: pear-core/PEAR/PackageFile/v2.php
diff -u pear-core/PEAR/PackageFile/v2.php:1.114 pear-core/PEAR/PackageFile/v2.php:1.115
--- pear-core/PEAR/PackageFile/v2.php:1.114 Tue Sep 27 00:12:53 2005
+++ pear-core/PEAR/PackageFile/v2.php Tue Oct 18 23:32:27 2005
@@ -15,7 +15,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: v2.php,v 1.114 2005/09/27 04:12:53 cellog Exp $
+ * @version CVS: $Id: v2.php,v 1.115 2005/10/19 03:32:27 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -1822,6 +1822,9 @@
function analyzeSourceCode($file, $string = false)
{
if (!isset($this->_v2Validator)) {
+ if (!class_exists('PEAR_PackageFile_v2_Validator')) {
+ require_once 'PEAR/PackageFile/v2/Validator.php';
+ }
$this->_v2Validator = new PEAR_PackageFile_v2_Validator;
}
return $this->_v2Validator->analyzeSourceCode($file, $string);