r73669 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73668‎ | r73669 | r73670 >
Date:17:51, 24 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.4 - refactoring the parameter formats to a more OOP architecture like done with the criteria
Modified paths:
  • /trunk/extensions/Validator/Validator.php (modified) (history)
  • /trunk/extensions/Validator/includes/Parameter.php (modified) (history)
  • /trunk/extensions/Validator/includes/ParameterCriterion.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/includes/ParameterCriterion.php
@@ -1,7 +1,7 @@
22 <?php
33
44 /**
5 - * Parameter criterion definition class.
 5+ * Parameter criterion base class.
66 *
77 * @since 0.4
88 *
Index: trunk/extensions/Validator/includes/Parameter.php
@@ -534,6 +534,8 @@
535535 */
536536 protected function getCriteriaForType() {
537537 $criteria = array();
 538+
 539+ // TODO: also have similar auto-adding of manipulations
538540
539541 switch( $this->type ) {
540542 case self::TYPE_INTEGER:
Index: trunk/extensions/Validator/Validator.php
@@ -55,14 +55,17 @@
5656 $incDir = dirname( __FILE__ ) . '/includes/';
5757 $wgAutoloadClasses['CriterionValidationResult'] = $incDir . 'CriterionValidationResult.php';
5858 $wgAutoloadClasses['ItemParameterCriterion'] = $incDir . 'ItemParameterCriterion.php';
 59+$wgAutoloadClasses['ItemParameterManipulation'] = $incDir . 'ItemParameterManipulation.php';
5960 $wgAutoloadClasses['ListParameter'] = $incDir . 'ListParameter.php';
6061 $wgAutoloadClasses['ListParameterCriterion'] = $incDir . 'ListParameterCriterion.php';
 62+$wgAutoloadClasses['ListParameterManipulation'] = $incDir . 'ListParameterManipulation.php';
6163 $wgAutoloadClasses['Parameter'] = $incDir . 'Parameter.php';
6264 $wgAutoloadClasses['ParameterCriterion'] = $incDir . 'ParameterCriterion.php';
 65+$wgAutoloadClasses['ParameterManipulation'] = $incDir . 'ParameterManipulation.php';
6366 $wgAutoloadClasses['ParserHook'] = $incDir . 'ParserHook.php';
6467 $wgAutoloadClasses['Validator'] = $incDir . 'Validator.php';
6568 $wgAutoloadClasses['TopologicalSort'] = $incDir . 'TopologicalSort.php';
66 -$wgAutoloadClasses['ValidationFormats'] = $incDir . 'ValidationFormats.php';
 69+$wgAutoloadClasses['ValidationFormats'] = $incDir . 'ValidationFormats.php'; // TODO: remove
6770 $wgAutoloadClasses['ValidationError'] = $incDir . 'ValidationError.php';
6871 $wgAutoloadClasses['ValidationErrorHandler'] = $incDir . 'ValidationErrorHandler.php';
6972

Follow-up revisions

RevisionCommit summaryAuthorDate
r73670Follow up to r73669 - didn't commit the new files o_Ojeroendedauw18:14, 24 September 2010

Status & tagging log