Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5962961
Location.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
845 B
Referenced Files
None
Subscribers
None
Location.php
View Options
<?php
namespace
Wikimedia\WikiPEG
;
class
Location
implements
\JsonSerializable
{
/** @var int 0-based byte offset into the input string */
public
$offset
;
/** @var int 1-based line number */
public
$line
;
/** @var int 1-based column number */
public
$column
;
/**
* @param int $offset
* @param int $line
* @param int $column
*/
public
function
__construct
(
$offset
,
$line
,
$column
)
{
$this
->
offset
=
$offset
;
$this
->
line
=
$line
;
$this
->
column
=
$column
;
}
/** @return string */
public
function
__toString
()
{
return
"{$this->line}:{$this->column}"
;
}
/**
* Emit a JSON serialization similar to JS, for testing
* @return array
*/
#[\ReturnTypeWillChange]
public
function
jsonSerialize
():
array
{
return
[
'offset'
=>
$this
->
offset
,
'line'
=>
$this
->
line
,
'column'
=>
$this
->
column
,
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 09:17 (1 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
90/b3/0218c5f5131f7dce67af8a8d217a
Default Alt Text
Location.php (845 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment