Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7496736
DateIntervalFilter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
639 B
Referenced Files
None
Subscribers
None
DateIntervalFilter.php
View Options
<?php
namespace
DeepCopy\TypeFilter\Date
;
use
DateInterval
;
use
DeepCopy\TypeFilter\TypeFilter
;
/**
* @final
*
* @deprecated Will be removed in 2.0. This filter will no longer be necessary in PHP 7.1+.
*/
class
DateIntervalFilter
implements
TypeFilter
{
/**
* {@inheritdoc}
*
* @param DateInterval $element
*
* @see http://news.php.net/php.bugs/205076
*/
public
function
apply
(
$element
)
{
$copy
=
new
DateInterval
(
'P0D'
);
foreach
(
$element
as
$propertyName
=>
$propertyValue
)
{
$copy
->{
$propertyName
}
=
$propertyValue
;
}
return
$copy
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 22:32 (6 d, 17 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b5/2c/5f55350ccf6b21c23e84405bc936
Default Alt Text
DateIntervalFilter.php (639 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment