Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4852439
PhabricatorCalendarICSImportEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
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
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jun 9, 06:33 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1753376
Default Alt Text
PhabricatorCalendarICSImportEngine.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment