Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F117012396
DoorkeeperRemarkupRuleAsana.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, Jun 10, 21:09
Size
739 B
Mime Type
text/x-php
Expires
Thu, Jun 12, 21:09 (2 d)
Engine
blob
Format
Raw Data
Handle
26704365
Attached To
rPH Phabricator
DoorkeeperRemarkupRuleAsana.php
View Options
<?php
final
class
DoorkeeperRemarkupRuleAsana
extends
DoorkeeperRemarkupRule
{
public
function
apply
(
$text
)
{
return
preg_replace_callback
(
'@https://app
\\
.asana
\\
.com/0/(
\\
d+)/(
\\
d+)@'
,
array
(
$this
,
'markupAsanaLink'
),
$text
);
}
public
function
markupAsanaLink
(
$matches
)
{
return
$this
->
addDoorkeeperTag
(
array
(
'href'
=>
$matches
[
0
],
'tag'
=>
array
(
'ref'
=>
array
(
DoorkeeperBridgeAsana
::
APPTYPE_ASANA
,
DoorkeeperBridgeAsana
::
APPDOMAIN_ASANA
,
DoorkeeperBridgeAsana
::
OBJTYPE_TASK
,
$matches
[
2
],
),
'extra'
=>
array
(
'asana.context'
=>
$matches
[
1
],
),
),
));
}
}
Event Timeline
Log In to Comment