PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.8.9
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.8.9
4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 All 200 releases
betterdocs / includes / Dependencies / PhpParser / Node / Stmt / Function_.php

Function_.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 3.8.9, at includes/Dependencies/PhpParser/Node/Stmt/Function_.php

61 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPDeveloper\BetterDocs\Dependencies\PhpParser\Node\Stmt;
4
5 use WPDeveloper\BetterDocs\Dependencies\PhpParser\Node;
6 use WPDeveloper\BetterDocs\Dependencies\PhpParser\Node\FunctionLike;
7
8 class Function_ extends Node\Stmt implements FunctionLike
9 {
10 /** @var bool Whether function returns by reference */
11 public $byRef;
12 /** @var string Name */
13 public $name;
14 /** @var Node\Param[] Parameters */
15 public $params;
16 /** @var null|string|Node\Name|Node\NullableType Return type */
17 public $returnType;
18 /** @var Node[] Statements */
19 public $stmts;
20
21 /**
22 * Constructs a function node.
23 *
24 * @param string $name Name
25 * @param array $subNodes Array of the following optional subnodes:
26 * 'byRef' => false : Whether to return by reference
27 * 'params' => array(): Parameters
28 * 'returnType' => null : Return type
29 * 'stmts' => array(): Statements
30 * @param array $attributes Additional attributes
31 */
32 public function __construct($name, array $subNodes = array(), array $attributes = array()) {
33 parent::__construct($attributes);
34 $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
35 $this->name = $name;
36 $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
37 $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
38 $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
39 }
40
41 public function getSubNodeNames() {
42 return array('byRef', 'name', 'params', 'returnType', 'stmts');
43 }
44
45 public function returnsByRef() {
46 return $this->byRef;
47 }
48
49 public function getParams() {
50 return $this->params;
51 }
52
53 public function getReturnType() {
54 return $this->returnType;
55 }
56
57 public function getStmts() {
58 return $this->stmts;
59 }
60 }
61