Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7418491
SourceLocation.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
SourceLocation.php
View Options
<?php
/**
* This file is part of the Peast package
*
* (c) Marco Marchiò <marco.mm89@gmail.com>
*
* For the full copyright and license information refer to the LICENSE file
* distributed with this source code
*/
namespace
Peast\Syntax
;
/**
* This class represents a location in the source code with start and end
* position.
*
* @author Marco Marchiò <marco.mm89@gmail.com>
*/
class
SourceLocation
implements
\JSONSerializable
{
/**
* Start position
*
* @var Position
*/
public
$start
;
/**
* End position
*
* @var Position
*/
public
$end
;
/**
* Returns the start position
*
* @return Position
*/
public
function
getStart
()
{
return
$this
->
start
;
}
/**
* Sets the start position
*
* @param Position $position Start position
*
* @return $this
*/
public
function
setStart
(
Position
$position
)
{
$this
->
start
=
$position
;
return
$this
;
}
/**
* Returns the end position
*
* @return Position
*/
public
function
getEnd
()
{
return
$this
->
end
;
}
/**
* Sets the end position
*
* @param Position $position End position
*
* @return $this
*/
public
function
setEnd
(
Position
$position
)
{
$this
->
end
=
$position
;
return
$this
;
}
/**
* Returns a serializable version of the object
*
* @return array
*/
#[\ReturnTypeWillChange]
public
function
jsonSerialize
()
{
return
array
(
"start"
=>
$this
->
start
,
"end"
=>
$this
->
end
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 03:57 (1 d, 8 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f2/5a/6ae767ea98833566c714f757838e
Default Alt Text
SourceLocation.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment