Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F470443
HeraldRepetitionPolicyConfig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
666 B
Referenced Files
None
Subscribers
None
HeraldRepetitionPolicyConfig.php
View Options
<?php
final
class
HeraldRepetitionPolicyConfig
{
const
FIRST
=
'first'
;
// only execute the first time (no repeating)
const
EVERY
=
'every'
;
// repeat every time
private
static
$policyIntMap
=
array
(
self
::
FIRST
=>
0
,
self
::
EVERY
=>
1
,
);
public
static
function
getMap
()
{
return
array
(
self
::
EVERY
=>
pht
(
'every time'
),
self
::
FIRST
=>
pht
(
'only the first time'
),
);
}
public
static
function
toInt
(
$str
)
{
return
idx
(
self
::
$policyIntMap
,
$str
,
self
::
$policyIntMap
[
self
::
EVERY
]);
}
public
static
function
toString
(
$int
)
{
return
idx
(
array_flip
(
self
::
$policyIntMap
),
$int
,
self
::
EVERY
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 10:56 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
81970
Default Alt Text
HeraldRepetitionPolicyConfig.php (666 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment