Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4134314
ComponentValueList.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
894 B
Referenced Files
None
Subscribers
None
ComponentValueList.php
View Options
<?php
/**
* @file
* @license https://opensource.org/licenses/Apache-2.0 Apache-2.0
*/
namespace
Wikimedia\CSS\Objects
;
use
InvalidArgumentException
;
/**
* Represent a list of CSS declarations
*/
class
ComponentValueList
extends
CSSObjectList
{
/**
* @var string
*/
protected
static
$objectType
=
ComponentValue
::
class
;
/** @inheritDoc */
protected
static
function
testObjects
(
array
$objects
)
{
foreach
(
$objects
as
$object
)
{
$type
=
$object
instanceof
Token
?
$object
->
type
()
:
'n/a'
;
switch
(
$type
)
{
case
Token
::
T_FUNCTION
:
case
Token
::
T_LEFT_BRACKET
:
case
Token
::
T_LEFT_PAREN
:
case
Token
::
T_LEFT_BRACE
:
throw
new
InvalidArgumentException
(
static
::
class
.
" may not contain tokens of type
\"
$type
\"
."
);
}
}
}
/** @inheritDoc */
public
function
toComponentValueArray
()
{
// Much simpler
return
$this
->
objects
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 12:34 (3 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b8/ee/537b4087d5a4b9a5d17fa5cdb78f
Default Alt Text
ComponentValueList.php (894 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment