Index: trunk/extensions/Wikidata/OmegaWiki/Fetcher.php |
— | — | @@ -32,6 +32,12 @@ |
33 | 33 | // public function fetch($keyPath, $record) { |
34 | 34 | // return $keyPath->peek($this->objectIdAttributeLevel)->getAttributeValue($this->objectIdAttribute); |
35 | 35 | // } |
| 36 | + function __tostring(){ |
| 37 | + $attributeLevel=$this->attributeLevel; |
| 38 | + $attribute=$this->attribute; |
| 39 | + return "ObjectIdFetcher($attributeLevel, $attribute)"; |
| 40 | + } |
| 41 | + |
36 | 42 | } |
37 | 43 | |
38 | 44 | class DefinitionObjectIdFetcher extends DefaultFetcher { |
— | — | @@ -39,6 +45,12 @@ |
40 | 46 | $definedMeaningId = $keyPath->peek($this->attributeLevel)->getAttributeValue($this->attribute); |
41 | 47 | return getDefinedMeaningDefinitionId($definedMeaningId); |
42 | 48 | } |
| 49 | + |
| 50 | + function __tostring(){ |
| 51 | + $attributeLevel=$this->attributeLevel; |
| 52 | + $attribute=$this->attribute; |
| 53 | + return "DefinitionObjectIdFetcher($attributeLevel, $attribute)"; |
| 54 | + } |
43 | 55 | } |
44 | 56 | |
45 | 57 | |
Index: trunk/extensions/Wikidata/OmegaWiki/Attribute.php |
— | — | @@ -39,6 +39,12 @@ |
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
| 43 | + function __tostring() { |
| 44 | + $id=$this->id; |
| 45 | + $name=$this->name; |
| 46 | + $type=$this->type; |
| 47 | + return "Attribute($id, $name, $type)"; |
| 48 | + } |
43 | 49 | } |
44 | 50 | |
45 | 51 | class Structure { |
— | — | @@ -111,7 +117,7 @@ |
112 | 118 | throw new Exception("Invalid structure constructor: ".print_r($args,true)); |
113 | 119 | } |
114 | 120 | } |
115 | | - |
| 121 | + |
116 | 122 | public function supportsAttributeId($attributeId) { |
117 | 123 | // $result = false; |
118 | 124 | // $i = 0; |
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php |
— | — | @@ -756,6 +756,7 @@ |
757 | 757 | $classMembershipEditor = getDefinedMeaningClassMembershipEditor($viewInformation); |
758 | 758 | $collectionMembershipEditor = getDefinedMeaningCollectionMembershipEditor($viewInformation); |
759 | 759 | |
| 760 | + #var_dump($definitionEditor); |
760 | 761 | $possiblySynonymousEditor = getGroupedRelationTypeEditor( |
761 | 762 | $o->possiblySynonymous, |
762 | 763 | $o->possiblySynonymousId, |
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php |
— | — | @@ -1175,8 +1175,9 @@ |
1176 | 1176 | } |
1177 | 1177 | |
1178 | 1178 | function getDefiningExpressionRecord($definedMeaningId) { |
1179 | | - $o=OmegaWikiAttributes::getInstance(); |
1180 | 1179 | |
| 1180 | + $o=OmegaWikiAttributes::getInstance(); |
| 1181 | + |
1181 | 1182 | $definingExpression=definingExpressionRow($definedMeaningId); |
1182 | 1183 | $definingExpressionRecord = new ArrayRecord($o->definedMeaningCompleteDefiningExpression->type); |
1183 | 1184 | $definingExpressionRecord->expressionId = $definingExpression[0]; |
Index: trunk/extensions/Wikidata/OmegaWiki/ViewInformation.php |
— | — | @@ -58,6 +58,10 @@ |
59 | 59 | $this->showRecordLifeSpan.",". |
60 | 60 | $this->viewOrEdit; |
61 | 61 | } |
| 62 | + |
| 63 | + public function __tostring(){ |
| 64 | + return "viewinformation object>"; |
| 65 | + } |
62 | 66 | } |
63 | 67 | |
64 | 68 | ?> |
Index: trunk/extensions/Wikidata/OmegaWiki/small/wfMsg.pl |
— | — | @@ -0,0 +1,8 @@ |
| 2 | +#!/usr/bin/perl |
| 3 | + |
| 4 | + |
| 5 | +while(<>) { |
| 6 | + s/wfMsg\(\s*\"(ow_)?(.*?)\"(.*?)\)/wfMsg_sc("$2"$3)/; |
| 7 | + s/wfMsg\(\s*\'(ow_)?(.*?)\'(.*?)\)/wfMsg_sc("$2"$3)/; |
| 8 | + print; |
| 9 | +} |
Property changes on: trunk/extensions/Wikidata/OmegaWiki/small/wfMsg.pl |
___________________________________________________________________ |
Added: svn:executable |
1 | 10 | + * |
Index: trunk/extensions/Wikidata/OmegaWiki/small/autoreplace.sh |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | #!/bin/bash |
3 | 3 | export myfile=$1; |
4 | 4 | |
5 | | -perl -pe "s/wfMsg_sc/wfMsgSc/g" $myfile > $myfile.new && |
| 5 | +small/apiview.pl $myfile > $myfile.new && |
6 | 6 | mv $myfile.new $myfile |
Index: trunk/extensions/Wikidata/OmegaWiki/small/apiview.pl |
— | — | @@ -1,6 +1,10 @@ |
2 | 2 | #!/usr/bin/perl |
3 | 3 | |
| 4 | +my $myclass=""; |
4 | 5 | while(<>) { |
5 | | - s/(function.*)/$1\nprint"$1";\n/; |
| 6 | + if (/class/){ |
| 7 | + $myclass=$_; |
| 8 | + } |
| 9 | + s/function(.*?)(\(.*$)/function$1$2\nwfDebug("$myclass--$1\\n");\n/; |
6 | 10 | print; |
7 | 11 | } |
Index: trunk/extensions/Wikidata/OmegaWiki/Editor.php |
— | — | @@ -88,6 +88,10 @@ |
89 | 89 | public function getKeyStack() { |
90 | 90 | return $this->keyStack; |
91 | 91 | } |
| 92 | + |
| 93 | + public function __tostring() { |
| 94 | + return "<object of class IdStack>"; |
| 95 | + } |
92 | 96 | } |
93 | 97 | |
94 | 98 | //added the "allow add controller" to be able to control the usage of the add field in different circumstances |
— | — | @@ -2208,4 +2212,4 @@ |
2209 | 2213 | public function showsData($value) { |
2210 | 2214 | return true; |
2211 | 2215 | } |
2212 | | -} |
\ No newline at end of file |
| 2216 | +} |