Index: trunk/extensions/SemanticMediaWiki/includes/SMW_OldDataValue.php |
— | — | @@ -1,7 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | require_once('SMW_Datatype.php'); |
5 | | -require_once('SMW_DataValue.php'); |
6 | 5 | |
7 | 6 | /** |
8 | 7 | * Objects of this type represent all that is known about |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php |
— | — | @@ -4,6 +4,8 @@ |
5 | 5 | * Objects of this type represent all that is known about |
6 | 6 | * a certain user-provided data value, especially its various |
7 | 7 | * representations as strings, tooltips, numbers, etc. |
| 8 | + * |
| 9 | + * @note AUTOLOADED |
8 | 10 | */ |
9 | 11 | abstract class SMWDataValue { |
10 | 12 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_List.php |
— | — | @@ -11,6 +11,8 @@ |
12 | 12 | * in between their elements depending on whether the element is the first that is |
13 | 13 | * printed, the first that is printed in parentheses, or the last that will be printed. |
14 | 14 | * Maybe one could further simplify this. |
| 15 | + * |
| 16 | + * @note AUTOLOADED |
15 | 17 | */ |
16 | 18 | class SMWListResultPrinter extends SMWResultPrinter { |
17 | 19 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Error.php |
— | — | @@ -1,12 +1,10 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -global $smwgIP; |
5 | | -include_once($smwgIP . '/includes/SMW_DataValue.php'); |
6 | | - |
7 | 4 | /** |
8 | 5 | * This datavalue implements Error-Datavalues. |
9 | | - * |
10 | | - * @author: Nikolas Iwan |
| 6 | + * |
| 7 | + * @author Nikolas Iwan |
| 8 | + * @note AUTOLOADED |
11 | 9 | */ |
12 | 10 | class SMWErrorValue extends SMWDataValue { |
13 | 11 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Table.php |
— | — | @@ -6,6 +6,8 @@ |
7 | 7 | |
8 | 8 | /** |
9 | 9 | * New implementation of SMW's printer for result tables. |
| 10 | + * |
| 11 | + * @note AUTOLOADED |
10 | 12 | */ |
11 | 13 | class SMWTableResultPrinter extends SMWResultPrinter { |
12 | 14 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_URI.php |
— | — | @@ -4,8 +4,9 @@ |
5 | 5 | * This datavalue implements URL/URI/ANNURI/EMAIL-Datavalues suitable for defining |
6 | 6 | * the respective types of properties. |
7 | 7 | * |
8 | | - * @author: Nikolas Iwan |
9 | | - * @author: Markus Krötzsch |
| 8 | + * @author Nikolas Iwan |
| 9 | + * @author Markus Krötzsch |
| 10 | + * @note AUTOLOADED |
10 | 11 | */ |
11 | 12 | |
12 | 13 | define('SMW_URI_MODE_EMAIL',1); |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Embedded.php |
— | — | @@ -12,6 +12,7 @@ |
13 | 13 | * If "titlestyle" is not specified, a <h1> tag is used. |
14 | 14 | * @author Fernando Correia |
15 | 15 | * @author Markus Krötzsch |
| 16 | + * @note AUTOLOADED |
16 | 17 | */ |
17 | 18 | class SMWEmbeddedResultPrinter extends SMWResultPrinter { |
18 | 19 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php |
— | — | @@ -1,13 +1,12 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -global $smwgIP; |
5 | | -include_once($smwgIP . '/includes/SMW_DataValue.php'); |
6 | | - |
7 | 4 | /** |
8 | 5 | * This datavalue implements String-Datavalues suitable for defining |
9 | 6 | * String-types of properties. |
10 | 7 | * |
11 | | - * @author: Nikolas Iwan |
| 8 | + * @author Nikolas Iwan |
| 9 | + * @author Markus Krötzsch |
| 10 | + * @note AUTOLOADED |
12 | 11 | */ |
13 | 12 | class SMWStringValue extends SMWDataValue { |
14 | 13 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Timeline.php |
— | — | @@ -7,6 +7,8 @@ |
8 | 8 | |
9 | 9 | /** |
10 | 10 | * New implementation of SMW's printer for timeline data. |
| 11 | + * |
| 12 | + * @note AUTOLOADED |
11 | 13 | */ |
12 | 14 | class SMWTimelineResultPrinter extends SMWResultPrinter { |
13 | 15 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Template.php |
— | — | @@ -7,6 +7,8 @@ |
8 | 8 | /** |
9 | 9 | * Printer for template data. Passes a result row as anonymous parameters to |
10 | 10 | * a given template (which might ignore them or not) and prints the result. |
| 11 | + * |
| 12 | + * @note AUTOLOADED |
11 | 13 | */ |
12 | 14 | class SMWTemplateResultPrinter extends SMWResultPrinter { |
13 | 15 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SpecialPage.php |
— | — | @@ -9,6 +9,8 @@ |
10 | 10 | * A simple extension of SpecialPage that ensures that all relevant SMW-user |
11 | 11 | * messages are loaded when the special page is initialised. This is especially |
12 | 12 | * relevant as an adaptor for query pages. |
| 13 | + * |
| 14 | + * @note AUTOLOAD |
13 | 15 | */ |
14 | 16 | class SMWSpecialPage extends SpecialPage { |
15 | 17 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php |
— | — | @@ -55,36 +55,44 @@ |
56 | 56 | } |
57 | 57 | $wgExtensionFunctions[] = 'smwfSetupExtension'; |
58 | 58 | |
59 | | - ///// setup some autoloading ///// |
| 59 | + ///// Set up autoloading |
| 60 | + ///// All classes registered for autoloading here should be tagged with this information: |
| 61 | + ///// Add "@note AUTOLOADED" to their class documentation. This avoids useless includes. |
| 62 | + |
| 63 | + // printers |
60 | 64 | $wgAutoloadClasses['SMWResultPrinter'] = $smwgIP . '/includes/SMW_QueryPrinter.php'; |
61 | 65 | $wgAutoloadClasses['SMWTableResultPrinter'] = $smwgIP . '/includes/SMW_QP_Table.php'; |
62 | 66 | $wgAutoloadClasses['SMWListResultPrinter'] = $smwgIP . '/includes/SMW_QP_List.php'; |
63 | 67 | $wgAutoloadClasses['SMWTimelineResultPrinter'] = $smwgIP . '/includes/SMW_QP_Timeline.php'; |
64 | 68 | $wgAutoloadClasses['SMWEmbeddedResultPrinter'] = $smwgIP . '/includes/SMW_QP_Embedded.php'; |
65 | 69 | $wgAutoloadClasses['SMWTemplateResultPrinter'] = $smwgIP . '/includes/SMW_QP_Template.php'; |
| 70 | + // datavalues |
| 71 | + $wgAutoloadClasses['SMWDataValue'] = $smwgIP . '/includes/SMW_DataValue.php'; |
| 72 | + // the builtin types are registered by SMWDataValueFactory if needed, will be reliably available |
| 73 | + // to other DV-implementations that register to the factory. |
66 | 74 | |
67 | | - ///// register specials, do that early on in case some other extension calls "addPage" ///// |
68 | | - $wgAutoloadClasses['SMWAskPage'] = $smwgIP . '/specials/AskSpecial/SMW_SpecialAsk.php'; |
69 | | - $wgSpecialPages['Ask'] = array('SMWAskPage'); |
70 | | - $wgAutoloadClasses['SMWSpecialBrowse'] = $smwgIP . '/specials/SearchTriple/SMW_SpecialBrowse.php'; |
71 | | - $wgSpecialPages['Browse'] = array('SMWSpecialBrowse'); |
72 | | - $wgAutoloadClasses['SMWPageProperty'] = $smwgIP . '/specials/SearchTriple/SMW_SpecialPageProperty.php'; |
73 | | - $wgSpecialPages['PageProperty'] = array('SMWPageProperty'); |
| 75 | + ///// Register specials, do that early on in case some other extension calls "addPage" ///// |
| 76 | + $wgAutoloadClasses['SMWAskPage'] = $smwgIP . '/specials/AskSpecial/SMW_SpecialAsk.php'; |
| 77 | + $wgSpecialPages['Ask'] = array('SMWAskPage'); |
| 78 | + $wgAutoloadClasses['SMWSpecialBrowse'] = $smwgIP . '/specials/SearchTriple/SMW_SpecialBrowse.php'; |
| 79 | + $wgSpecialPages['Browse'] = array('SMWSpecialBrowse'); |
| 80 | + $wgAutoloadClasses['SMWPageProperty'] = $smwgIP . '/specials/SearchTriple/SMW_SpecialPageProperty.php'; |
| 81 | + $wgSpecialPages['PageProperty'] = array('SMWPageProperty'); |
74 | 82 | $wgAutoloadClasses['SMWSearchByProperty'] = $smwgIP . '/specials/SearchTriple/SMW_SpecialSearchByProperty.php'; |
75 | | - $wgSpecialPages['SearchByProperty'] = array('SMWSearchByProperty'); |
76 | | - $wgAutoloadClasses['SMWURIResolver'] = $smwgIP . '/specials/URIResolver/SMW_SpecialURIResolver.php'; |
77 | | - $wgSpecialPages['URIResolver'] = array('SMWURIResolver'); |
78 | | - $wgAutoloadClasses['SMWAdmin'] = $smwgIP . '/specials/SMWAdmin/SMW_SpecialSMWAdmin.php'; |
79 | | - $wgSpecialPages['SMWAdmin'] = array('SMWAdmin'); |
| 83 | + $wgSpecialPages['SearchByProperty'] = array('SMWSearchByProperty'); |
| 84 | + $wgAutoloadClasses['SMWURIResolver'] = $smwgIP . '/specials/URIResolver/SMW_SpecialURIResolver.php'; |
| 85 | + $wgSpecialPages['URIResolver'] = array('SMWURIResolver'); |
| 86 | + $wgAutoloadClasses['SMWAdmin'] = $smwgIP . '/specials/SMWAdmin/SMW_SpecialSMWAdmin.php'; |
| 87 | + $wgSpecialPages['SMWAdmin'] = array('SMWAdmin'); |
| 88 | + // suboptimal special pages using the SMWSpecialPage wrapper class: |
| 89 | + $wgAutoloadClasses['SMWSpecialPage'] = $smwgIP . '/includes/SMW_SpecialPage.php'; |
| 90 | + $wgSpecialPages['Properties'] = array('SMWSpecialPage','Properties', 'smwfDoSpecialProperties', $smwgIP . '/specials/QueryPages/SMW_SpecialProperties.php'); |
| 91 | + $wgSpecialPages['UnusedProperties'] = array('SMWSpecialPage','UnusedProperties', 'smwfDoSpecialUnusedProperties', $smwgIP . '/specials/QueryPages/SMW_SpecialUnusedProperties.php'); |
| 92 | + $wgSpecialPages['WantedProperties'] = array('SMWSpecialPage','WantedProperties', 'smwfDoSpecialWantedProperties', $smwgIP . '/specials/QueryPages/SMW_SpecialWantedProperties.php'); |
| 93 | + $wgSpecialPages['ExportRDF'] = array('SMWSpecialPage','ExportRDF', 'smwfDoSpecialExportRDF', $smwgIP . '/specials/ExportRDF/SMW_SpecialExportRDF.php'); |
| 94 | + $wgSpecialPages['SemanticStatistics'] = array('SMWSpecialPage','SemanticStatistics', 'smwfExecuteSemanticStatistics', $smwgIP . '/specials/Statistics/SMW_SpecialStatistics.php'); |
| 95 | + $wgSpecialPages['Types'] = array('SMWSpecialPage','Types', 'smwfDoSpecialTypes', $smwgIP . '/specials/QueryPages/SMW_SpecialTypes.php'); |
80 | 96 | |
81 | | - $wgAutoloadClasses['SMWSpecialPage'] = $smwgIP . '/includes/SMW_SpecialPage.php'; |
82 | | - $wgSpecialPages['Properties'] = array('SMWSpecialPage','Properties', 'smwfDoSpecialProperties', $smwgIP . '/specials/QueryPages/SMW_SpecialProperties.php'); |
83 | | - $wgSpecialPages['UnusedProperties'] = array('SMWSpecialPage','UnusedProperties', 'smwfDoSpecialUnusedProperties', $smwgIP . '/specials/QueryPages/SMW_SpecialUnusedProperties.php'); |
84 | | - $wgSpecialPages['WantedProperties'] = array('SMWSpecialPage','WantedProperties', 'smwfDoSpecialWantedProperties', $smwgIP . '/specials/QueryPages/SMW_SpecialWantedProperties.php'); |
85 | | - $wgSpecialPages['ExportRDF'] = array('SMWSpecialPage','ExportRDF', 'smwfDoSpecialExportRDF', $smwgIP . '/specials/ExportRDF/SMW_SpecialExportRDF.php'); |
86 | | - $wgSpecialPages['SemanticStatistics'] = array('SMWSpecialPage','SemanticStatistics', 'smwfExecuteSemanticStatistics', $smwgIP . '/specials/Statistics/SMW_SpecialStatistics.php'); |
87 | | - $wgSpecialPages['Types'] = array('SMWSpecialPage','Types', 'smwfDoSpecialTypes', $smwgIP . '/specials/QueryPages/SMW_SpecialTypes.php'); |
88 | | - |
89 | 97 | return true; |
90 | 98 | } |
91 | 99 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_WikiPage.php |
— | — | @@ -1,8 +1,5 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -global $smwgIP; |
5 | | -include_once($smwgIP . '/includes/SMW_DataValue.php'); |
6 | | - |
7 | 4 | /** |
8 | 5 | * This datavalue implements special processing suitable for defining |
9 | 6 | * wikipages as values of properties. This value container currently |
— | — | @@ -12,6 +9,7 @@ |
13 | 10 | * |
14 | 11 | * @author Nikolas Iwan |
15 | 12 | * @author Markus Krötzsch |
| 13 | + * @note AUTOLOADED |
16 | 14 | */ |
17 | 15 | class SMWWikiPageValue extends SMWDataValue { |
18 | 16 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Types.php |
— | — | @@ -1,8 +1,5 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -global $smwgIP; |
5 | | -include_once($smwgIP . '/includes/SMW_DataValue.php'); |
6 | | - |
7 | 4 | /** |
8 | 5 | * This datavalue implements special processing suitable for defining |
9 | 6 | * types of properties (n-ary or binary). |
— | — | @@ -11,6 +8,9 @@ |
12 | 9 | * - to efficiently be generated from XSD values and to provide according |
13 | 10 | * wiki values, in order to support speedy creation of datavalues in |
14 | 11 | * SMWDataValueFactory. |
| 12 | + * |
| 13 | + * @author Markus Krötzsch |
| 14 | + * @note AUTOLOADED |
15 | 15 | */ |
16 | 16 | class SMWTypesValue extends SMWDataValue { |
17 | 17 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_NAry.php |
— | — | @@ -1,14 +1,12 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * The SMWDataValue in this file implements the handling of n-ary relations. |
| 5 | + * SMWDataValue implements the handling of n-ary relations. |
| 6 | + * |
6 | 7 | * @author Jörg Heizmann |
7 | 8 | * @author Markus Krötzsch |
| 9 | + * @note AUTOLOADED |
8 | 10 | */ |
9 | | - |
10 | | -global $smwgIP; |
11 | | -include_once($smwgIP . '/includes/SMW_DataValue.php'); |
12 | | - |
13 | 11 | class SMWNAryValue extends SMWDataValue { |
14 | 12 | |
15 | 13 | private $m_scount = 0; |
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php |
— | — | @@ -15,6 +15,8 @@ |
16 | 16 | /** |
17 | 17 | * A class to encapsulate the special page that allows browsing through |
18 | 18 | * the knowledge structure of a Semantic MediaWiki. |
| 19 | + * |
| 20 | + * @note AUTOLOAD |
19 | 21 | */ |
20 | 22 | class SMWSpecialBrowse extends SpecialPage { |
21 | 23 | |
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | * This will be assumedly seldomly used. |
10 | 10 | * |
11 | 11 | * FIXME: Actually this is currently not used anywhere. |
12 | | - * FIXME: The result-page browsing is broken, showing the last result on one page as the first resutl of the next. |
| 12 | + * FIXME: The result-page browsing is broken, showing the last result on one page as the first result of the next. |
13 | 13 | */ |
14 | 14 | |
15 | 15 | if (!defined('MEDIAWIKI')) die(); |
— | — | @@ -16,6 +16,9 @@ |
17 | 17 | global $IP; |
18 | 18 | include_once( "$IP/includes/SpecialPage.php" ); |
19 | 19 | |
| 20 | +/** |
| 21 | + * @note AUTOLOAD |
| 22 | + */ |
20 | 23 | class SMWPageProperty extends SpecialPage { |
21 | 24 | |
22 | 25 | /** |
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php |
— | — | @@ -1,4 +1,10 @@ |
2 | 2 | <?php |
| 3 | + |
| 4 | +if (!defined('MEDIAWIKI')) die(); |
| 5 | + |
| 6 | +global $IP; |
| 7 | +include_once($IP . '/includes/SpecialPage.php'); |
| 8 | + |
3 | 9 | /** |
4 | 10 | * @author Denny Vrandecic |
5 | 11 | * |
— | — | @@ -6,13 +12,9 @@ |
7 | 13 | * view on a relation-object pair, i.e. a typed baclink. |
8 | 14 | * For example, it shows me all persons born in Croatia, |
9 | 15 | * or all winners of the Academy Award for best actress. |
| 16 | + * |
| 17 | + * @note AUTOLOAD |
10 | 18 | */ |
11 | | - |
12 | | -if (!defined('MEDIAWIKI')) die(); |
13 | | - |
14 | | -global $IP; |
15 | | -include_once($IP . '/includes/SpecialPage.php'); |
16 | | - |
17 | 19 | class SMWSearchByProperty extends SpecialPage { |
18 | 20 | |
19 | 21 | /** |
Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php |
— | — | @@ -1,16 +1,18 @@ |
2 | 2 | <?php |
| 3 | + |
| 4 | +if (!defined('MEDIAWIKI')) die(); |
| 5 | + |
| 6 | +global $IP; |
| 7 | +include_once($IP . '/includes/SpecialPage.php'); |
| 8 | + |
3 | 9 | /** |
4 | 10 | * @author Markus Krötzsch |
5 | 11 | * |
6 | 12 | * This special page for MediaWiki implements a customisable form for |
7 | 13 | * executing queries outside of articles. |
| 14 | + * |
| 15 | + * @note AUTOLOAD |
8 | 16 | */ |
9 | | - |
10 | | -if (!defined('MEDIAWIKI')) die(); |
11 | | - |
12 | | -global $IP; |
13 | | -include_once($IP . '/includes/SpecialPage.php'); |
14 | | - |
15 | 17 | class SMWAskPage extends SpecialPage { |
16 | 18 | |
17 | 19 | /** |
Index: trunk/extensions/SemanticMediaWiki/specials/SMWAdmin/SMW_SpecialSMWAdmin.php |
— | — | @@ -1,17 +1,19 @@ |
2 | 2 | <?php |
| 3 | + |
| 4 | +if (!defined('MEDIAWIKI')) die(); |
| 5 | + |
| 6 | +global $IP; |
| 7 | +include_once($IP . '/includes/SpecialPage.php'); |
| 8 | + |
3 | 9 | /** |
4 | 10 | * @author Markus Krötzsch |
5 | 11 | * |
6 | 12 | * This special page for MediaWiki provides an administrative interface |
7 | 13 | * that allows to execute certain functions related to the maintainance |
8 | 14 | * of the semantic database. It is restricted to users with siteadmin status. |
| 15 | + * |
| 16 | + * @note AUTOLOAD |
9 | 17 | */ |
10 | | - |
11 | | -if (!defined('MEDIAWIKI')) die(); |
12 | | - |
13 | | -global $IP; |
14 | | -include_once($IP . '/includes/SpecialPage.php'); |
15 | | - |
16 | 18 | class SMWAdmin extends SpecialPage { |
17 | 19 | |
18 | 20 | /** |
Index: trunk/extensions/SemanticMediaWiki/specials/URIResolver/SMW_SpecialURIResolver.php |
— | — | @@ -1,17 +1,19 @@ |
2 | 2 | <?php |
| 3 | + |
| 4 | +if (!defined('MEDIAWIKI')) die(); |
| 5 | + |
| 6 | +global $IP; |
| 7 | +include_once($IP . '/includes/SpecialPage.php'); |
| 8 | + |
3 | 9 | /** |
4 | 10 | * @author Denny Vrandecic |
5 | 11 | * |
6 | | - * This special page solves with the URI crisis |
| 12 | + * This special page solves the URI crisis |
7 | 13 | * without the need of changing code deep in |
8 | 14 | * MediaWiki were no hook has ever seen light. |
| 15 | + * |
| 16 | + * @note AUTOLOAD |
9 | 17 | */ |
10 | | - |
11 | | -if (!defined('MEDIAWIKI')) die(); |
12 | | - |
13 | | -global $IP; |
14 | | -include_once($IP . '/includes/SpecialPage.php'); |
15 | | - |
16 | 18 | class SMWURIResolver extends SpecialPage { |
17 | 19 | |
18 | 20 | /** |