Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2891982
DiffusionBrowseResultSet.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
2 KB
Referenced Files
None
Subscribers
None
DiffusionBrowseResultSet.php
View Options
<?php
final
class
DiffusionBrowseResultSet
{
const
REASON_IS_FILE
=
'is-file'
;
const
REASON_IS_DELETED
=
'is-deleted'
;
const
REASON_IS_NONEXISTENT
=
'nonexistent'
;
const
REASON_BAD_COMMIT
=
'bad-commit'
;
const
REASON_IS_EMPTY
=
'empty'
;
const
REASON_IS_UNTRACKED_PARENT
=
'untracked-parent'
;
private
$paths
;
private
$isValidResults
;
private
$reasonForEmptyResultSet
;
private
$existedAtCommit
;
private
$deletedAtCommit
;
public
function
setPaths
(
array
$paths
)
{
assert_instances_of
(
$paths
,
'DiffusionRepositoryPath'
)
;
$this
->
paths
=
$paths
;
return
$this
;
}
public
function
getPaths
(
)
{
return
$this
->
paths
;
}
public
function
setIsValidResults
(
$is_valid
)
{
$this
->
isValidResults
=
$is_valid
;
return
$this
;
}
public
function
isValidResults
(
)
{
return
$this
->
isValidResults
;
}
public
function
setReasonForEmptyResultSet
(
$reason
)
{
$this
->
reasonForEmptyResultSet
=
$reason
;
return
$this
;
}
public
function
getReasonForEmptyResultSet
(
)
{
return
$this
->
reasonForEmptyResultSet
;
}
public
function
setExistedAtCommit
(
$existed_at_commit
)
{
$this
->
existedAtCommit
=
$existed_at_commit
;
return
$this
;
}
public
function
getExistedAtCommit
(
)
{
return
$this
->
existedAtCommit
;
}
public
function
setDeletedAtCommit
(
$deleted_at_commit
)
{
$this
->
deletedAtCommit
=
$deleted_at_commit
;
return
$this
;
}
public
function
getDeletedAtCommit
(
)
{
return
$this
->
deletedAtCommit
;
}
public
function
toDictionary
(
)
{
$paths
=
$this
->
getPathDicts
(
)
;
return
array
(
'paths'
=>
$paths
,
'isValidResults'
=>
$this
->
isValidResults
(
)
,
'reasonForEmptyResultSet'
=>
$this
->
getReasonForEmptyResultSet
(
)
,
'existedAtCommit'
=>
$this
->
getExistedAtCommit
(
)
,
'deletedAtCommit'
=>
$this
->
getDeletedAtCommit
(
)
,
)
;
}
public
function
getPathDicts
(
)
{
$paths
=
$this
->
getPaths
(
)
;
if
(
$paths
)
{
return
mpull
(
$paths
,
'toDictionary'
)
;
}
return
array
(
)
;
}
public
static
function
newFromConduit
(
array
$data
)
{
$paths
=
array
(
)
;
$path_dicts
=
$data
[
'paths'
]
;
foreach
(
$path_dicts
as
$dict
)
{
$paths
[
]
=
DiffusionRepositoryPath
::
newFromDictionary
(
$dict
)
;
}
return
id
(
new
DiffusionBrowseResultSet
(
)
)
->
setPaths
(
$paths
)
->
setIsValidResults
(
$data
[
'isValidResults'
]
)
->
setReasonForEmptyResultSet
(
$data
[
'reasonForEmptyResultSet'
]
)
->
setExistedAtCommit
(
$data
[
'existedAtCommit'
]
)
->
setDeletedAtCommit
(
$data
[
'deletedAtCommit'
]
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Jan 19 2025, 16:01 (7 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126285
Default Alt Text
DiffusionBrowseResultSet.php (2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment