Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F115164319
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
Fri, May 30, 04:13
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jun 1, 04:13 (2 d)
Engine
blob
Format
Raw Data
Handle
26454402
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
;
}
/**
* @task internal
*/
protected
function
log
(
$pattern
/* ... */
)
{
if
(
$this
->
getVerbose
())
{
$console
=
PhutilConsole
::
getConsole
();
$argv
=
func_get_args
();
$argv
[
0
]
=
$argv
[
0
].
"
\n
"
;
call_user_func_array
(
array
(
$console
,
'writeOut'
),
$argv
);
}
return
$this
;
}
}
Event Timeline
Log In to Comment