forked from WordPress/phpdoc-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export the names of the functions used in each element
See WordPress#79
- Loading branch information
Showing
3 changed files
with
133 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
/** | ||
* A reflection class for a function call. | ||
*/ | ||
|
||
namespace WP_Parser; | ||
|
||
use phpDocumentor\Reflection\BaseReflector; | ||
use phpDocumentor\Reflection\DocBlock\Context; | ||
|
||
/** | ||
* A reflection of a function call expression. | ||
*/ | ||
class Function_Call_Reflector extends BaseReflector { | ||
|
||
/** | ||
* Initializes the reflector using the function statement object of | ||
* PHP-Parser. | ||
* | ||
* @param \PHPParser_Node_Expr_FuncCall $node Function object | ||
* coming from PHP-Parser. | ||
* @param \phpDocumentor\Reflection\DocBlock\Context $context The context in | ||
* which the node occurs. | ||
*/ | ||
public function __construct( \PHPParser_Node_Expr $node, Context $context ) { | ||
parent::__construct( $node, $context ); | ||
} | ||
|
||
/** | ||
* Returns the name for this Reflector instance. | ||
* | ||
* @return string | ||
*/ | ||
public function getName() { | ||
if (isset($this->node->namespacedName)) { | ||
return '\\'.implode('\\', $this->node->namespacedName->parts); | ||
} | ||
|
||
return (string) $this->getShortName(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters