Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97899492
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
Tue, Jan 7, 08:45
Size
857 B
Mime Type
text/x-php
Expires
Thu, Jan 9, 08:45 (2 d)
Engine
blob
Format
Raw Data
Handle
23434629
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