MediaWiki
REL1_24
|
00001 <?php 00016 class CLDRPluralRuleConverterFragment { 00017 public $parser, $pos, $length, $end; 00018 00019 function __construct( $parser, $pos, $length ) { 00020 $this->parser = $parser; 00021 $this->pos = $pos; 00022 $this->length = $length; 00023 $this->end = $pos + $length; 00024 } 00025 00026 public function error( $message ) { 00027 $text = $this->getText(); 00028 throw new CLDRPluralRuleError( "$message at position " . ( $this->pos + 1 ) . ": \"$text\"" ); 00029 } 00030 00031 public function getText() { 00032 return substr( $this->parser->rule, $this->pos, $this->length ); 00033 } 00034 }