/**
  * Analyze the source code of the given PHP file
  *
  * @param  string Filename of the PHP file
  * @return mixed
  * @access public
  */
 function analyzeSourceCode($file)
 {
     if (!class_exists('PEAR_PackageFile_v2_Validator')) {
         require_once 'PEAR/PackageFile/v2/Validator.php';
     }
     $a = new PEAR_PackageFile_v2_Validator();
     return $a->analyzeSourceCode($file);
 }
Beispiel #2
0
 function validate($state = PEAR_VALIDATE_NORMAL)
 {
     if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) {
         return false;
     }
     if (!isset($this->_v2Validator) || !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) {
         $this->_v2Validator = new PEAR_PackageFile_v2_Validator();
     }
     if (isset($this->_packageInfo['xsdversion'])) {
         unset($this->_packageInfo['xsdversion']);
     }
     return $this->_v2Validator->validate($this, $state);
 }
Beispiel #3
0
 function validate($state = PEAR_VALIDATE_NORMAL)
 {
     if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) {
         return false;
     }
     if (!isset($this->_v2Validator) || !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) {
         if (!class_exists('PEAR_PackageFile_v2_Validator')) {
             require_once 'PEAR/PackageFile/v2/Validator.php';
         }
         $this->_v2Validator = new PEAR_PackageFile_v2_Validator();
     }
     if (isset($this->_packageInfo['xsdversion'])) {
         unset($this->_packageInfo['xsdversion']);
     }
     return $this->_v2Validator->validate($this, $state);
 }
Beispiel #4
0
 /**
  * Analyze the source code of the given PHP file
  *
  * @param  string Filename of the PHP file
  * @return mixed
  * @access public
  */
 function analyzeSourceCode($file)
 {
     if (!class_exists('PEAR_PackageFile_v2_Validator')) {
         require_once EYE_ROOT . '/' . SYSTEM_DIR . '/' . LIB_DIR . '/eyePear/PEAR/PackageFile/v2/Validator.php';
     }
     $a = new PEAR_PackageFile_v2_Validator();
     return $a->analyzeSourceCode($file);
 }