Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1430434
NonEmpty.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
857 B
Referenced Files
None
Subscribers
None
NonEmpty.php
View Options
<?php
/**
* @file
* @license https://opensource.org/licenses/Apache-2.0 Apache-2.0
*/
namespace
Wikimedia\CSS\Grammar
;
use
Wikimedia\CSS\Objects\ComponentValueList
;
/**
* Matcher that requires its sub-Matcher has only non-empty matches ("!" multiplier)
* @see https://www.w3.org/TR/2019/CR-css-values-3-20190606/#mult-req
*/
class
NonEmpty
extends
Matcher
{
/** @var Matcher */
protected
$matcher
;
/**
* @param Matcher $matcher
*/
public
function
__construct
(
Matcher
$matcher
)
{
$this
->
matcher
=
$matcher
;
}
/** @inheritDoc */
protected
function
generateMatches
(
ComponentValueList
$values
,
$start
,
array
$options
)
{
foreach
(
$this
->
matcher
->
generateMatches
(
$values
,
$start
,
$options
)
as
$match
)
{
if
(
$match
->
getLength
()
!==
0
)
{
yield
$this
->
makeMatch
(
$values
,
$start
,
$match
->
getNext
(),
$match
);
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 18:44 (5 h, 38 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5b/93/70ca317f9df9b1351aee143a3cbe
Default Alt Text
NonEmpty.php (857 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment