[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @author Niklas Laxström, Tim Starling 4 * 5 * @copyright Copyright © 2010-2012, Niklas Laxström 6 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later 7 * 8 * @file 9 * @since 1.20 10 */ 11 12 /** 13 * Helper for CLDRPluralRuleConverter. 14 * An expression object, representing a region of the input string (for error 15 * messages), the RPN notation used to evaluate it, and the result type for 16 * validation. 17 */ 18 class CLDRPluralRuleConverterExpression extends CLDRPluralRuleConverterFragment { 19 /** @var string */ 20 public $type; 21 22 /** @var string */ 23 public $rpn; 24 25 function __construct( $parser, $type, $rpn, $pos, $length ) { 26 parent::__construct( $parser, $pos, $length ); 27 $this->type = $type; 28 $this->rpn = $rpn; 29 } 30 31 public function isType( $type ) { 32 if ( $type === 'range' && ( $this->type === 'range' || $this->type === 'number' ) ) { 33 return true; 34 } 35 if ( $type === $this->type ) { 36 return true; 37 } 38 39 return false; 40 } 41 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |