Page MenuHomeWickedGov Phorge

ShadowRootMode.php
No OneTemporary

Size
1019 B
Referenced Files
None
Subscribers
None

ShadowRootMode.php

<?php
// AUTOMATICALLY GENERATED. DO NOT EDIT.
// Use `composer build` to regenerate.
namespace Wikimedia\IDLeDOM;
/**
* ShadowRootMode
*
* @see https://dom.spec.whatwg.org/#enumdef-shadowrootmode
*
* @phan-forbid-undeclared-magic-properties
*/
final class ShadowRootMode {
/* Enumeration values */
public const open = 'open';
public const closed = 'closed';
private function __construct() {
/* Enumerations can't be instantiated */
}
// @phan-file-suppress PhanTypeInvalidThrowsIsInterface
/**
* Throw a TypeError if the provided string is not a
* valid member of this enumeration.
*
* @param string $value The string to test
* @return string The provided string, if it is valid
* @throws \Wikimedia\IDLeDOM\TypeError if it is not valid
*/
public static function cast( string $value ): string {
switch ( $value ) {
case 'open':
case 'closed':
return $value;
default:
throw new class() extends \Exception implements \Wikimedia\IDLeDOM\TypeError {
};
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Oct 3, 22:45 (1 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
95/32/21ad2ddacbd611db5a3919a54789
Default Alt Text
ShadowRootMode.php (1019 B)

Event Timeline