Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6036313
Expression.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
Expression.php
View Options
<?php
/**
* @author Niklas Laxström, Tim Starling
* @license GPL-2.0-or-later
* @file
*/
namespace
CLDRPluralRuleParser\Converter
;
use
CLDRPluralRuleParser\Converter
;
/**
* Helper for Converter.
* An expression object, representing a region of the input string (for error
* messages), the RPN notation used to evaluate it, and the result type for
* validation.
*/
class
Expression
extends
Fragment
{
/** @var string */
public
$type
;
/** @var string */
public
$rpn
;
/**
* @param Converter $parser
* @param string $type
* @param string $rpn
* @param int $pos
* @param int $length
*/
public
function
__construct
(
Converter
$parser
,
$type
,
$rpn
,
$pos
,
$length
)
{
parent
::
__construct
(
$parser
,
$pos
,
$length
);
$this
->
type
=
$type
;
$this
->
rpn
=
$rpn
;
}
/**
* @param string $type
* @return bool
*/
public
function
isType
(
$type
)
{
if
(
$type
===
'range'
&&
(
$this
->
type
===
'range'
||
$this
->
type
===
'number'
)
)
{
return
true
;
}
if
(
$type
===
$this
->
type
)
{
return
true
;
}
return
false
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 4 2026, 19:24 (5 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ed/5c/93034420aca24ea49a5c46235bdd
Default Alt Text
Expression.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment