Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1432923
RelayTokenHandler.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
RelayTokenHandler.php
View Options
<?php
namespace
Wikimedia\RemexHtml\Tokenizer
;
/**
* A TokenHandler which simply passes all tokens through to another token
* handler, specified in the constructor.
*
* Applications can subclass this in order to modify only a few token types
* as they pass through.
*
* @since 2.1.0
*/
class
RelayTokenHandler
implements
TokenHandler
{
/** @var TokenHandler */
protected
$nextHandler
;
/**
* Construct a RelayTokenHandler which will call $nextHandler on all events
*
* @param TokenHandler $nextHandler
*/
public
function
__construct
(
TokenHandler
$nextHandler
)
{
$this
->
nextHandler
=
$nextHandler
;
}
/**
* @inheritDoc
*/
public
function
startDocument
(
Tokenizer
$tokenizer
,
$fragmentNamespace
,
$fragmentName
)
{
$this
->
nextHandler
->
startDocument
(
$tokenizer
,
$fragmentNamespace
,
$fragmentName
);
}
/**
* @inheritDoc
*/
public
function
endDocument
(
$pos
)
{
$this
->
nextHandler
->
endDocument
(
$pos
);
}
/**
* @inheritDoc
*/
public
function
error
(
$text
,
$pos
)
{
$this
->
nextHandler
->
error
(
$text
,
$pos
);
}
/**
* @inheritDoc
*/
public
function
characters
(
$text
,
$start
,
$length
,
$sourceStart
,
$sourceLength
)
{
$this
->
nextHandler
->
characters
(
$text
,
$start
,
$length
,
$sourceStart
,
$sourceLength
);
}
/**
* @inheritDoc
*/
public
function
startTag
(
$name
,
Attributes
$attrs
,
$selfClose
,
$sourceStart
,
$sourceLength
)
{
$this
->
nextHandler
->
startTag
(
$name
,
$attrs
,
$selfClose
,
$sourceLength
,
$sourceLength
);
}
/**
* @inheritDoc
*/
public
function
endTag
(
$name
,
$sourceStart
,
$sourceLength
)
{
$this
->
nextHandler
->
endTag
(
$name
,
$sourceStart
,
$sourceLength
);
}
/**
* @inheritDoc
*/
public
function
doctype
(
$name
,
$public
,
$system
,
$quirks
,
$sourceStart
,
$sourceLength
)
{
$this
->
nextHandler
->
doctype
(
$name
,
$public
,
$system
,
$quirks
,
$sourceStart
,
$sourceLength
);
}
/**
* @inheritDoc
*/
public
function
comment
(
$text
,
$sourceStart
,
$sourceLength
)
{
$this
->
nextHandler
->
comment
(
$text
,
$sourceStart
,
$sourceLength
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 22:29 (2 h, 16 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4d/1c/ed0fd4811077b9aec6266c99cf68
Default Alt Text
RelayTokenHandler.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment