Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4072590
NonSerializableTrait.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
382 B
Referenced Files
None
Subscribers
None
NonSerializableTrait.php
View Options
<?php
namespace
Wikimedia\NonSerializable
;
use
LogicException
;
/**
* A trait that prevents serialization via php's builtin serialize() function.
*/
trait
NonSerializableTrait
{
/**
* @throws LogicException always
* @return never
*/
public
function
__sleep
():
never
{
throw
new
LogicException
(
'Instances of '
.
get_class
(
$this
)
.
' are not serializable!'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 17 2026, 08:17 (11 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
33/fc/d1e883f5916e9e238a749686d55f
Default Alt Text
NonSerializableTrait.php (382 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment