| [ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZDiffContent class 4 // 5 // <creation-tag> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 /*! \file ezdiffcontent.php 30 eZDiffContent class 31 */ 32 33 /*! 34 \class eZDiffContent ezdiffcontent.php 35 \ingroup eZDiff 36 \brief eZDiff provides an interface for accessing changes in an eZContentObject 37 38 eZDiffContent holds container structures for viewing and accessing detected differences 39 in an eZContentObject. This is an abstract class. 40 */ 41 42 class eZDiffContent 43 { 44 /*! 45 \public 46 Return the set of changes. 47 */ 48 function getChanges() 49 { 50 return $this->Changeset; 51 } 52 53 /*! 54 \public 55 Returns the old stored content 56 */ 57 function getOldContent() 58 { 59 return $this->OldContent; 60 } 61 62 /*! 63 \public 64 Returns the new stored content 65 */ 66 function getNewContent() 67 { 68 return $this->NewContent; 69 } 70 71 /*! 72 \public 73 Sets the old stored content 74 */ 75 function setOldContent( $data ) 76 { 77 $this->OldContent = $data; 78 } 79 80 /*! 81 \public 82 Sets the new stored content 83 */ 84 function setNewContent( $data ) 85 { 86 $this->NewContent = $data; 87 } 88 89 /*! 90 \public 91 Set the changeset array 92 */ 93 function setChanges( $data ) 94 { 95 $this->Changeset = $data; 96 } 97 98 99 function attributes() 100 { 101 return array( 'changes', 102 'old_content', 103 'new_content' ); 104 } 105 106 function hasAttribute( $name ) 107 { 108 return in_array( $name, $this->attributes() ); 109 } 110 111 function &attribute( $attrName ) 112 { 113 switch ( $attrName ) 114 { 115 case 'changes': 116 { 117 $retVal = $this->getChanges(); 118 }break; 119 120 case 'old_content': 121 { 122 $retVal = $this->getOldContent(); 123 }break; 124 125 case 'new_content': 126 { 127 $retVal = $this->getNewContent(); 128 }break; 129 130 default: 131 { 132 eZDebug::writeError( "Attribute '$attrName' does not exist", 'eZDiffContent' ); 133 $retVal = null; 134 }break; 135 } 136 return $retVal; 137 } 138 139 /// \privatesection 140 /// The set of detected changes 141 var $Changeset; 142 143 /// Old Object 144 var $OldContent; 145 146 /// New Object 147 var $NewContent; 148 } 149 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |