Go to the documentation of this file.00001 <?php
00002
00009 class oxFileCheckerResult
00010 {
00011
00017 protected $_aResult = array();
00018
00024 protected $_aResultSummary = array();
00025
00031 protected $_blListAllFiles = false;
00032
00036 public function __construct()
00037 {
00038 $this->_aResultSummary['OK'] = 0;
00039 $this->_aResultSummary['VERSIONMISMATCH'] = 0;
00040 $this->_aResultSummary['UNKNOWN'] = 0;
00041 $this->_aResultSummary['MODIFIED'] = 0;
00042 $this->_aResultSummary['FILES'] = 0;
00043 $this->_aResultSummary['SHOP_OK'] = true;
00044 }
00045
00051 public function setListAllFiles($blListAllFiles)
00052 {
00053 $this->_blListAllFiles = $blListAllFiles;
00054 }
00055
00061 public function getListAllFiles()
00062 {
00063 return $this->_blListAllFiles;
00064 }
00065
00071 public function getResult()
00072 {
00073 return $this->_aResult;
00074 }
00075
00081 public function getResultSummary()
00082 {
00083 return $this->_aResultSummary;
00084 }
00085
00093 public function addResult($aResult)
00094 {
00095 $this->_aResultSummary['FILES']++;
00096 $this->_aResultSummary[$aResult['result']]++;
00097
00098 if (!$aResult['ok']) {
00099 $this->_aResultSummary['SHOP_OK'] = false;
00100 }
00101
00102 if (($aResult['ok'] && $this->getListAllFiles()) || !$aResult['ok']) {
00103 $this->_aResult[] = $aResult;
00104 }
00105
00106 return $this->_aResultSummary;
00107 }
00108 }