Changeset 1049
- Timestamp:
- 01/21/07 08:57:29 (2 years ago)
- Files:
-
- branches/wheeljack/lib/MT/BackupRestore.pm (modified) (1 diff)
- branches/wheeljack/lib/MT/FileInfo.pm (modified) (2 diffs)
- branches/wheeljack/lib/MT/Object.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/wheeljack/lib/MT/BackupRestore.pm
r1031 r1049 1040 1040 } 1041 1041 1042 package MT::FileInfo; 1043 1044 sub parent_names { 1045 my $obj = shift; 1046 my $parents = { 1047 blog => 'MT::Blog', 1048 template => 'MT::Template', 1049 templatemap => 'MT::TemplateMap', 1050 category => 'MT::Category', 1051 entry => 'MT::Entry', 1052 }; 1053 $parents; 1054 } 1055 1042 1056 1; 1043 1057 __END__ branches/wheeljack/lib/MT/FileInfo.pm
r1040 r1049 62 62 } 63 63 64 sub parent_names {65 my $obj = shift;66 my $parents = {67 blog => 'MT::Blog',68 template => 'MT::Template',69 templatemap => 'MT::TemplateMap',70 category => 'MT::Category',71 entry => 'MT::Entry',72 };73 $parents;74 }75 76 64 1; 77 65 … … 120 108 TemplateMap should be given. 121 109 122 =item parent_names()123 124 Returns a hash of package names relating the data model to parent125 objects.126 127 110 =back 128 111 branches/wheeljack/lib/MT/Object.pm
r1031 r1049 1155 1155 =item * $obj->parent_names() 1156 1156 1157 TODO - Should be overridden by subclasses to return correct hash 1158 whose keys are xml element names of the object's parent objects 1159 and values are class names of them. 1157 TODO - Should be overridden by subclasses and returns a hash 1158 reference whose keys are xml element names of the object's parent 1159 objects and values are package names of each of them. 1160 1161 { 'blog' => 'MT::Blog' } 1162 1163 Here, parent-child relationship is determined based on the data 1164 model, not based on "base class" and "derived class" in the paradigm of 1165 the object oriented programming. 1166 1160 1167 This method is defined in MT/BackupRestore.pm - you must first 1161 1168 use MT::BackupRestore to use this method.
