Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1432812
Set.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
532 B
Referenced Files
None
Subscribers
None
Set.php
View Options
<?php
class
Stripe_Util_Set
{
private
$_elts
;
public
function
__construct
(
$members
=
array
())
{
$this
->
_elts
=
array
();
foreach
(
$members
as
$item
)
$this
->
_elts
[
$item
]
=
true
;
}
public
function
includes
(
$elt
)
{
return
isset
(
$this
->
_elts
[
$elt
]);
}
public
function
add
(
$elt
)
{
$this
->
_elts
[
$elt
]
=
true
;
}
public
function
discard
(
$elt
)
{
unset
(
$this
->
_elts
[
$elt
]);
}
// TODO: make Set support foreach
public
function
toArray
()
{
return
array_keys
(
$this
->
_elts
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jul 9, 1:30 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
333035
Default Alt Text
Set.php (532 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment