Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5981063
Text.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1009 B
Referenced Files
None
Subscribers
None
Text.php
View Options
<?php
namespace
Wikimedia\RemexHtml\TreeBuilder
;
use
Wikimedia\RemexHtml\Tokenizer\Attributes
;
/**
* The "text" insertion mode
*/
class
Text
extends
InsertionMode
{
public
function
characters
(
$text
,
$start
,
$length
,
$sourceStart
,
$sourceLength
)
{
$this
->
builder
->
insertCharacters
(
$text
,
$start
,
$length
,
$sourceStart
,
$sourceLength
);
}
public
function
endDocument
(
$pos
)
{
$this
->
builder
->
error
(
'unexpected end of input in text mode'
,
$pos
);
$this
->
builder
->
pop
(
$pos
,
0
);
$this
->
dispatcher
->
restoreMode
()
->
endDocument
(
$pos
);
}
public
function
startTag
(
$name
,
Attributes
$attrs
,
$selfClose
,
$sourceStart
,
$sourceLength
)
{
// @phan-suppress-previous-line PhanPluginNeverReturnMethod
throw
new
TreeBuilderError
(
'unexpected token'
);
}
public
function
endTag
(
$name
,
$sourceStart
,
$sourceLength
)
{
// I think this is complete if we have no support for executing scripts
$this
->
builder
->
pop
(
$sourceStart
,
$sourceLength
);
$this
->
dispatcher
->
restoreMode
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 21:42 (1 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
45/cb/4d42b5e817f43190594b41b1c391
Default Alt Text
Text.php (1009 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment