r73670 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73669‎ | r73670 | r73671 >
Date:18:14, 24 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r73669 - didn't commit the new files o_O
Modified paths:
  • /trunk/extensions/Validator/includes/ItemParameterManipualtion.php (added) (history)
  • /trunk/extensions/Validator/includes/ListParameterManipulation.php (added) (history)
  • /trunk/extensions/Validator/includes/ParameterManipulation.php (added) (history)

Diff [purge]

Index: trunk/extensions/Validator/includes/ListParameterManipulation.php
@@ -0,0 +1,34 @@
 2+<?php
 3+
 4+/**
 5+ * List parameter manipulation base class. This is for manipulations
 6+ * that apply to list parameters as a whole instead of to their
 7+ * individual items.
 8+ *
 9+ * @since 0.4
 10+ *
 11+ * @file ListParameterManipulation.php
 12+ * @ingroup Validator
 13+ * @ingroup ParameterManipulations
 14+ *
 15+ * @author Jeroen De Dauw
 16+ */
 17+abstract class ListParameterManipulation extends ParameterManipulation {
 18+
 19+ /**
 20+ * Constructor.
 21+ *
 22+ * @since 0.4
 23+ */
 24+ public function __construct() {
 25+ parent::__construct();
 26+ }
 27+
 28+ /**
 29+ * @see ParameterManipulation::isForLists
 30+ */
 31+ public function isForLists() {
 32+ return true;
 33+ }
 34+
 35+}
\ No newline at end of file
Property changes on: trunk/extensions/Validator/includes/ListParameterManipulation.php
___________________________________________________________________
Added: svn:eol-style
136 + native
Index: trunk/extensions/Validator/includes/ParameterManipulation.php
@@ -0,0 +1,46 @@
 2+<?php
 3+
 4+/**
 5+ * Parameter manipulation base class.
 6+ *
 7+ * @since 0.4
 8+ *
 9+ * @file ParameterManipulation.php
 10+ * @ingroup Validator
 11+ * @ingroup ParameterManipulations
 12+ *
 13+ * @author Jeroen De Dauw
 14+ */
 15+abstract class ParameterManipulation {
 16+
 17+ /**
 18+ * Validate a parameter against the criterion.
 19+ *
 20+ * @param Parameter $parameter
 21+ * @param array $parameters
 22+ *
 23+ * @since 0.4
 24+ *
 25+ * @return CriterionValidationResult
 26+ */
 27+ public abstract function manipulate( Parameter &$parameter, array &$parameters );
 28+
 29+ /**
 30+ * Returns if the manipulation applies to lists as a whole.
 31+ *
 32+ * @since 0.4
 33+ *
 34+ * @return boolean
 35+ */
 36+ public abstract function isForLists();
 37+
 38+ /**
 39+ * Constructor.
 40+ *
 41+ * @since 0.4
 42+ */
 43+ public function __construct() {
 44+
 45+ }
 46+
 47+}
\ No newline at end of file
Property changes on: trunk/extensions/Validator/includes/ParameterManipulation.php
___________________________________________________________________
Added: svn:eol-style
148 + native
Index: trunk/extensions/Validator/includes/ItemParameterManipualtion.php
@@ -0,0 +1,34 @@
 2+<?php
 3+
 4+/**
 5+ * Item parameter manipulation base class. This is for manipulations
 6+ * that apply to individial values, which can either be the whole value
 7+ * of a non-list parameter, or a single item of a list parameter.
 8+ *
 9+ * @since 0.4
 10+ *
 11+ * @file ItemParameterManipulation.php
 12+ * @ingroup Validator
 13+ * @ingroup ParameterManipulations
 14+ *
 15+ * @author Jeroen De Dauw
 16+ */
 17+abstract class ItemParameterManipulation extends ParameterManipulation {
 18+
 19+ /**
 20+ * Constructor.
 21+ *
 22+ * @since 0.4
 23+ */
 24+ public function __construct() {
 25+ parent::__construct();
 26+ }
 27+
 28+ /**
 29+ * @see ParameterManipulation::isForLists
 30+ */
 31+ public function isForLists() {
 32+ return false;
 33+ }
 34+
 35+}
\ No newline at end of file
Property changes on: trunk/extensions/Validator/includes/ItemParameterManipualtion.php
___________________________________________________________________
Added: svn:eol-style
136 + native

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r73669Changes for 0.4 - refactoring the parameter formats to a more OOP architectur...jeroendedauw17:51, 24 September 2010

Status & tagging log