當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PEAR_ErrorStack::getErrors方法代碼示例

本文整理匯總了PHP中PEAR_ErrorStack::getErrors方法的典型用法代碼示例。如果您正苦於以下問題:PHP PEAR_ErrorStack::getErrors方法的具體用法?PHP PEAR_ErrorStack::getErrors怎麽用?PHP PEAR_ErrorStack::getErrors使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PEAR_ErrorStack的用法示例。


在下文中一共展示了PEAR_ErrorStack::getErrors方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getValidationWarnings

 /**
  * Wrapper to {@link PEAR_ErrorStack::getErrors()}
  * @param boolean determines whether to purge the error stack after retrieving
  * @return array
  */
 function getValidationWarnings($purge = true)
 {
     return $this->_stack->getErrors($purge);
 }
開發者ID:michabbb,項目名稱:pear-core,代碼行數:9,代碼來源:v1.php

示例2: getErrors

 /**
  * Wrapper method to get errors from the Error Stack.
  *
  * @return array|bool an array of the errors or false if there are no errors
  *
  * @access public
  */
 function getErrors()
 {
     if (is_object($this->stack)) {
         return $this->stack->getErrors();
     }
     return false;
 }
開發者ID:laiello,項目名稱:punchcms,代碼行數:14,代碼來源:LiveUser.php

示例3: validate

 /**
  * @param PEAR_PackageFile_v2
  * @param int
  */
 function validate(&$pf, $state = PEAR_VALIDATE_NORMAL)
 {
     $this->_pf =& $pf;
     $this->_curState = $state;
     $this->_packageInfo = $this->_pf->getArray();
     $this->_isValid = $this->_pf->_isValid;
     $this->_filesValid = $this->_pf->_filesValid;
     $this->_stack =& $pf->_stack;
     $this->_stack->getErrors(true);
     if (($this->_isValid & $state) == $state) {
         return true;
     }
     if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) {
         return false;
     }
     if (!isset($this->_packageInfo['attribs']['version']) || $this->_packageInfo['attribs']['version'] != '2.0' && $this->_packageInfo['attribs']['version'] != '2.1') {
         $this->_noPackageVersion();
     }
     $structure = array('name', 'channel|uri', '*extends', 'summary', 'description', '+lead', '*developer', '*contributor', '*helper', 'date', '*time', 'version', 'stability', 'license->?uri->?filesource', 'notes', 'contents', '*compatible', 'dependencies', '*usesrole', '*usestask', '*providesextension', '*srcpackage|*srcuri', '+phprelease|+extsrcrelease|+extbinrelease|' . '+zendextsrcrelease|+zendextbinrelease|bundle', '*changelog');
     $test = $this->_packageInfo;
     if (isset($test['dependencies']) && isset($test['dependencies']['required']) && isset($test['dependencies']['required']['pearinstaller']) && isset($test['dependencies']['required']['pearinstaller']['min']) && version_compare('1.8.0', $test['dependencies']['required']['pearinstaller']['min'], '<')) {
         $this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
         return false;
     }
     // ignore post-installation array fields
     if (array_key_exists('filelist', $test)) {
         unset($test['filelist']);
     }
     if (array_key_exists('_lastmodified', $test)) {
         unset($test['_lastmodified']);
     }
     if (array_key_exists('#binarypackage', $test)) {
         unset($test['#binarypackage']);
     }
     if (array_key_exists('old', $test)) {
         unset($test['old']);
     }
     if (array_key_exists('_lastversion', $test)) {
         unset($test['_lastversion']);
     }
     if (!$this->_stupidSchemaValidate($structure, $test, '<package>')) {
         return false;
     }
     if (empty($this->_packageInfo['name'])) {
         $this->_tagCannotBeEmpty('name');
     }
     $test = isset($this->_packageInfo['uri']) ? 'uri' : 'channel';
     if (empty($this->_packageInfo[$test])) {
         $this->_tagCannotBeEmpty($test);
     }
     if (is_array($this->_packageInfo['license']) && (!isset($this->_packageInfo['license']['_content']) || empty($this->_packageInfo['license']['_content']))) {
         $this->_tagCannotBeEmpty('license');
     } elseif (empty($this->_packageInfo['license'])) {
         $this->_tagCannotBeEmpty('license');
     }
     if (empty($this->_packageInfo['summary'])) {
         $this->_tagCannotBeEmpty('summary');
     }
     if (empty($this->_packageInfo['description'])) {
         $this->_tagCannotBeEmpty('description');
     }
     if (empty($this->_packageInfo['date'])) {
         $this->_tagCannotBeEmpty('date');
     }
     if (empty($this->_packageInfo['notes'])) {
         $this->_tagCannotBeEmpty('notes');
     }
     if (isset($this->_packageInfo['time']) && empty($this->_packageInfo['time'])) {
         $this->_tagCannotBeEmpty('time');
     }
     if (isset($this->_packageInfo['dependencies'])) {
         $this->_validateDependencies();
     }
     if (isset($this->_packageInfo['compatible'])) {
         $this->_validateCompatible();
     }
     if (!isset($this->_packageInfo['bundle'])) {
         if (empty($this->_packageInfo['contents'])) {
             $this->_tagCannotBeEmpty('contents');
         }
         if (!isset($this->_packageInfo['contents']['dir'])) {
             $this->_filelistMustContainDir('contents');
             return false;
         }
         if (isset($this->_packageInfo['contents']['file'])) {
             $this->_filelistCannotContainFile('contents');
             return false;
         }
     }
     $this->_validateMaintainers();
     $this->_validateStabilityVersion();
     $fail = false;
     if (array_key_exists('usesrole', $this->_packageInfo)) {
         $roles = $this->_packageInfo['usesrole'];
         if (!is_array($roles) || !isset($roles[0])) {
             $roles = array($roles);
//.........這裏部分代碼省略.........
開發者ID:racontemoi,項目名稱:mamp,代碼行數:101,代碼來源:Validator.php

示例4: getErrors

 /**
  * Wrapper to {@link PEAR_ErrorStack::getErrors()}
  * @param boolean determines whether to purge the error stack after retrieving
  * @return array
  */
 function getErrors($purge = false)
 {
     return $this->_stack->getErrors($purge);
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:9,代碼來源:ChannelFile.php


注:本文中的PEAR_ErrorStack::getErrors方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。