Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4086995
NonSerializableTrait.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
375 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
()
{
throw
new
LogicException
(
'Instances of '
.
get_class
(
$this
)
.
' are not serializable!'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 18 2026, 09:17 (6 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
94/2e/4cc2b653a0bd68b746aa7e8b2681
Default Alt Text
NonSerializableTrait.php (375 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment