Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93135937
DiffusionPhpExternalSymbolsSource.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, Nov 26, 11:44
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 28, 11:44 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22579760
Attached To
rPH Phabricator
DiffusionPhpExternalSymbolsSource.php
View Options
<?php
final
class
DiffusionPhpExternalSymbolsSource
extends
DiffusionExternalSymbolsSource
{
public
function
executeQuery
(
DiffusionExternalSymbolQuery
$query
)
{
$symbols
=
array
();
if
(!
$query
->
matchesAnyLanguage
(
array
(
'php'
)))
{
return
$symbols
;
}
$names
=
$query
->
getNames
();
if
(
$query
->
matchesAnyType
(
array
(
'function'
)))
{
$functions
=
get_defined_functions
();
$functions
=
$functions
[
'internal'
];
foreach
(
$names
as
$name
)
{
if
(
in_array
(
$name
,
$functions
))
{
$symbols
[]
=
$this
->
buildExternalSymbol
()
->
setSymbolName
(
$name
)
->
setSymbolType
(
'function'
)
->
setSource
(
pht
(
'PHP'
))
->
setLocation
(
pht
(
'Manual at php.net'
))
->
setSymbolLanguage
(
'php'
)
->
setExternalURI
(
'http://www.php.net/function.'
.
$name
);
}
}
}
if
(
$query
->
matchesAnyType
(
array
(
'class'
)))
{
foreach
(
$names
as
$name
)
{
if
(
class_exists
(
$name
,
false
)
||
interface_exists
(
$name
,
false
))
{
if
(
id
(
new
ReflectionClass
(
$name
))->
isInternal
())
{
$symbols
[]
=
$this
->
buildExternalSymbol
()
->
setSymbolName
(
$name
)
->
setSymbolType
(
'class'
)
->
setSource
(
pht
(
'PHP'
))
->
setLocation
(
pht
(
'Manual at php.net'
))
->
setSymbolLanguage
(
'php'
)
->
setExternalURI
(
'http://www.php.net/class.'
.
$name
);
}
}
}
}
return
$symbols
;
}
}
Event Timeline
Log In to Comment