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