summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Validator/src/ParamProcessor/TitleParser.php')
-rw-r--r--Validator/src/ParamProcessor/TitleParser.php36
1 files changed, 0 insertions, 36 deletions
diff --git a/Validator/src/ParamProcessor/TitleParser.php b/Validator/src/ParamProcessor/TitleParser.php
deleted file mode 100644
index a6f2b887..00000000
--- a/Validator/src/ParamProcessor/TitleParser.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-namespace ParamProcessor;
-
-use ValueParsers\ParseException;
-use ValueParsers\StringValueParser;
-
-/**
- * ValueParser that parses the string representation of a MediaWiki Title object.
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw < jeroendedauw@gmail.com >
- */
-class TitleParser extends StringValueParser {
-
- /**
- * @see StringValueParser::stringParse
- *
- * @since 0.1
- *
- * @param string $value
- *
- * @return MediaWikiTitleValue
- * @throws ParseException
- */
- protected function stringParse( $value ) {
- $value = \Title::newFromText( $value );
-
- if ( is_null( $value ) ) {
- throw new ParseException( 'Not a title' );
- }
-
- return new MediaWikiTitleValue( $value );
- }
-
-} \ No newline at end of file