Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F15618154
ValueRepresentation.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
751 B
Referenced Files
None
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, Nov 26, 01:17 (23 h, 19 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
21314
Default Alt Text
ValueRepresentation.php (751 B)
Attached To
Mode
rZED Zed
Attached
Detach File
Event Timeline
Log In to Comment