Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112086451
PhabricatorRepositoryEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 7, 14:27
Size
1 KB
Mime Type
text/x-php
Expires
Fri, May 9, 14:27 (2 d)
Engine
blob
Format
Raw Data
Handle
26012232
Attached To
rPH Phabricator
PhabricatorRepositoryEngine.php
View Options
<?php
/**
* @task config Configuring Repository Engines
* @task internal Internals
*/
abstract
class
PhabricatorRepositoryEngine
{
private
$repository
;
private
$verbose
;
/**
* @task config
*/
public
function
setRepository
(
PhabricatorRepository
$repository
)
{
$this
->
repository
=
$repository
;
return
$this
;
}
/**
* @task config
*/
protected
function
getRepository
()
{
if
(
$this
->
repository
===
null
)
{
throw
new
Exception
(
"Call setRepository() to provide a repository!"
);
}
return
$this
->
repository
;
}
/**
* @task config
*/
public
function
setVerbose
(
$verbose
)
{
$this
->
verbose
=
$verbose
;
return
$this
;
}
/**
* @task config
*/
public
function
getVerbose
()
{
return
$this
->
verbose
;
}
public
function
getViewer
()
{
return
PhabricatorUser
::
getOmnipotentUser
();
}
/**
* @task internal
*/
protected
function
log
(
$pattern
/* ... */
)
{
if
(
$this
->
getVerbose
())
{
$console
=
PhutilConsole
::
getConsole
();
$argv
=
func_get_args
();
array_unshift
(
$argv
,
"%s
\n
"
);
call_user_func_array
(
array
(
$console
,
'writeOut'
),
$argv
);
}
return
$this
;
}
}
Event Timeline
Log In to Comment