Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121641736
PhabricatorTextExportFormat.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
Sat, Jul 12, 18:10
Size
857 B
Mime Type
text/x-php
Expires
Mon, Jul 14, 18:10 (2 d)
Engine
blob
Format
Raw Data
Handle
27365219
Attached To
rPH Phabricator
PhabricatorTextExportFormat.php
View Options
<?php
final
class
PhabricatorTextExportFormat
extends
PhabricatorExportFormat
{
const
EXPORTKEY
=
'text'
;
private
$rows
=
array
();
public
function
getExportFormatName
()
{
return
'Tab-Separated Text (.txt)'
;
}
public
function
isExportFormatEnabled
()
{
return
true
;
}
public
function
getFileExtension
()
{
return
'txt'
;
}
public
function
getMIMEContentType
()
{
return
'text/plain'
;
}
public
function
addObject
(
$object
,
array
$fields
,
array
$map
)
{
$values
=
array
();
foreach
(
$fields
as
$key
=>
$field
)
{
$value
=
$map
[
$key
];
$value
=
$field
->
getTextValue
(
$value
);
$value
=
addcslashes
(
$value
,
"
\0
..
\3
7
\\\1
77..
\3
77"
);
$values
[]
=
$value
;
}
$this
->
rows
[]
=
implode
(
"
\t
"
,
$values
);
}
public
function
newFileData
()
{
return
implode
(
"
\n
"
,
$this
->
rows
).
"
\n
"
;
}
}
Event Timeline
Log In to Comment