Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F1136737
ValueRepresentation.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
751 B
Subscribers
None
ValueRepresentation.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Zed\Engines\API\Format
;
enum
ValueRepresentation
{
///
/// Possible values
///
/**
* Representation as XML tags with generic key
*/
case
List
;
/**
* Representation as XML tags matching keys
*/
case
Object
;
/**
* Direct representation as string
*/
case
Scalar
;
///
/// Helper methods
///
public
static
function
from
(
mixed
$value
)
:
self
{
if
(
is_object
(
$value
))
{
return
self
::
Object
;
}
if
(
is_array
(
$value
))
{
if
(
array_is_list
(
$value
))
{
return
self
::
List
;
}
return
self
::
Object
;
}
return
self
::
Scalar
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jul 10, 23:27 (4 w, 5 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
21314
Default Alt Text
ValueRepresentation.php (751 B)
Attached To
rZED Zed
Event Timeline
Log In to Comment