Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5966875
LocationRange.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
906 B
Referenced Files
None
Subscribers
None
LocationRange.php
View Options
<?php
namespace
Wikimedia\WikiPEG
;
class
LocationRange
implements
\JsonSerializable
{
/** @var Location */
public
$start
;
/** @var Location */
public
$end
;
/**
* @param int $startOffset
* @param int $startLine
* @param int $startColumn
* @param int $endOffset
* @param int $endLine
* @param int $endColumn
*/
public
function
__construct
(
$startOffset
,
$startLine
,
$startColumn
,
$endOffset
,
$endLine
,
$endColumn
)
{
$this
->
start
=
new
Location
(
$startOffset
,
$startLine
,
$startColumn
);
$this
->
end
=
new
Location
(
$endOffset
,
$endLine
,
$endColumn
);
}
/** @return string */
public
function
__toString
()
{
return
"{$this->start}-{$this->end}"
;
}
/**
* Emit a JSON serialization similar to JS, for testing
* @return array
*/
#[\ReturnTypeWillChange]
public
function
jsonSerialize
():
array
{
return
[
'start'
=>
$this
->
start
,
'end'
=>
$this
->
end
,
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 11:58 (3 d, 15 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b4/3b/45fb8e12468e6103394c4f3f0410
Default Alt Text
LocationRange.php (906 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment