00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 class eZDiffContent
00045 {
00046
00047
00048
00049
00050 function getChanges()
00051 {
00052 return $this->Changeset;
00053 }
00054
00055
00056
00057
00058
00059 function getOldContent()
00060 {
00061 return $this->OldContent;
00062 }
00063
00064
00065
00066
00067
00068 function getNewContent()
00069 {
00070 return $this->NewContent;
00071 }
00072
00073
00074
00075
00076
00077 function setOldContent( $data )
00078 {
00079 $this->OldContent = $data;
00080 }
00081
00082
00083
00084
00085
00086 function setNewContent( $data )
00087 {
00088 $this->NewContent = $data;
00089 }
00090
00091
00092
00093
00094
00095 function setChanges( $data )
00096 {
00097 $this->Changeset = $data;
00098 }
00099
00100
00101 function attributes()
00102 {
00103 return array( 'changes',
00104 'old_content',
00105 'new_content' );
00106 }
00107
00108 function hasAttribute( $name )
00109 {
00110 return in_array( $name, $this->attributes() );
00111 }
00112
00113 function &attribute( $attrName )
00114 {
00115 switch ( $attrName )
00116 {
00117 case 'changes':
00118 {
00119 $retVal = $this->getChanges();
00120 }break;
00121
00122 case 'old_content':
00123 {
00124 $retVal = $this->getOldContent();
00125 }break;
00126
00127 case 'new_content':
00128 {
00129 $retVal = $this->getNewContent();
00130 }break;
00131
00132 default:
00133 {
00134 eZDebug::writeError( "Attribute '$attrName' does not exist", 'eZDiffContent' );
00135 $retVal = null;
00136 }break;
00137 }
00138 return $retVal;
00139 }
00140
00141
00142
00143 var $Changeset;
00144
00145
00146 var $OldContent;
00147
00148
00149 var $NewContent;
00150 }
00151 ?>