Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892605
PhageAction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
PhageAction.php
View Options
<?php
abstract
class
PhageAction
extends
Phobject
{
private
$actions
=
array
(
)
;
abstract
public
function
isContainerAction
(
)
;
protected
function
willAddAction
(
PhageAction
$action
)
{
throw
new
PhutilMethodNotImplementedException
(
)
;
}
final
protected
function
getActions
(
)
{
$this
->
requireContainerAction
(
)
;
return
$this
->
actions
;
}
final
public
function
addAction
(
PhageAction
$action
)
{
$this
->
requireContainerAction
(
)
;
$this
->
willAddAction
(
$action
)
;
$this
->
actions
[
]
=
$action
;
}
protected
function
getAllWaitingChannels
(
)
{
if
(
!
$this
->
isContainerAction
(
)
)
{
throw
new
PhutilMethodNotImplementedException
(
)
;
}
$channels
=
array
(
)
;
foreach
(
$this
->
getActions
(
)
as
$action
)
{
foreach
(
$action
->
getAllWaitingChannels
(
)
as
$channel
)
{
$channels
[
]
=
$channel
;
}
}
return
$channels
;
}
private
function
requireContainerAction
(
)
{
if
(
!
$this
->
isContainerAction
(
)
)
{
throw
new
Exception
(
pht
(
'This is not a container action.'
)
)
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 17:04 (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1116135
Default Alt Text
PhageAction.php (1 KB)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment