Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F111299951
PhabricatorCalendarICSImportEngine.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, Apr 30, 15:56
Size
1 KB
Mime Type
text/x-php
Expires
Fri, May 2, 15:56 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25888486
Attached To
rPH Phabricator
PhabricatorCalendarICSImportEngine.php
View Options
<?php
abstract
class
PhabricatorCalendarICSImportEngine
extends
PhabricatorCalendarImportEngine
{
final
protected
function
importICSData
(
PhabricatorUser
$viewer
,
PhabricatorCalendarImport
$import
,
$data
)
{
$parser
=
new
PhutilICSParser
();
try
{
$document
=
$parser
->
parseICSData
(
$data
);
}
catch
(
PhutilICSParserException
$ex
)
{
// TODO: In theory, it would be nice to store these in a fully abstract
// form so they can be translated at display time. As-is, we'll store the
// error messages in whatever language we were using when the parser
// failure occurred.
$import
->
newLogMessage
(
PhabricatorCalendarImportICSLogType
::
LOGTYPE
,
array
(
'ics.code'
=>
$ex
->
getParserFailureCode
(),
'ics.message'
=>
$ex
->
getMessage
(),
));
$document
=
null
;
}
foreach
(
$parser
->
getWarnings
()
as
$warning
)
{
$import
->
newLogMessage
(
PhabricatorCalendarImportICSWarningLogType
::
LOGTYPE
,
array
(
'ics.warning.code'
=>
$warning
[
'code'
],
'ics.warning.line'
=>
$warning
[
'line'
],
'ics.warning.text'
=>
$warning
[
'text'
],
'ics.warning.message'
=>
$warning
[
'message'
],
));
}
return
$this
->
importEventDocument
(
$viewer
,
$import
,
$document
);
}
}
Event Timeline
Log In to Comment