Page MenuHomeWickedGov Phorge

LocationRange.php
No OneTemporary

Size
906 B
Referenced Files
None
Subscribers
None

LocationRange.php

<?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

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)

Event Timeline