Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4793344
PhabricatorGetProjectsMap.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorGetProjectsMap.php
View Options
<?php
namespace
Nasqueron\Notifications\Console\Commands
;
use
Illuminate\Console\Command
;
use
Nasqueron\Notifications\Phabricator\ProjectsMap
;
use
Services
;
class
PhabricatorGetProjectsMap
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'phabricator:projectsmap'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'Regenerate the projects map for each Phabricator instances'
;
/**
* Create a new command instance.
*
* @return void
*/
public
function
__construct
()
{
parent
::
__construct
();
}
/**
* Execute the console command.
*
* @return mixed
*/
public
function
handle
()
{
foreach
(
Services
::
getForGate
(
'Phabricator'
)
as
$service
)
{
$this
->
info
(
"Querying projects map for "
.
$service
->
instance
);
$map
=
ProjectsMap
::
fetch
(
$service
->
instance
);
$map
->
saveToCache
();
$this
->
table
(
[
'PHID'
,
'Project name'
],
$map
->
toArray
()
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Feb 28, 21:45 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2436193
Default Alt Text
PhabricatorGetProjectsMap.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment