Node.js
{
"type": "file",
"namespace": {
"type": "namespace",
"name": "Taeluf\\PHTML",
"declaration": "namespace Taeluf\\PHTML;",
"class": [
{
"type": "class",
"namespace": "Taeluf\\PHTML",
"fqn": "Taeluf\\PHTML\\Node",
"name": "Node",
"extends": "\\DOMElement",
"declaration": "class Node extends \\DOMElement",
"comments": [
"public $hideOwnTag = false;",
"protected $children = [];",
""
],
"methods": [
{
"type": "method",
"args": [],
"modifiers": [
"public"
],
"name": "__construct",
"body": [],
"declaration": "public function __construct()"
},
{
"type": "method",
"args": [
{
"type": "arg",
"arg_types": [
"string"
],
"name": "tagName",
"declaration": "string $tagName"
}
],
"docblock": {
"type": "docblock",
"description": "is this node the given tag"
},
"modifiers": [
"public"
],
"name": "is",
"return_types": [
"bool"
],
"body": [],
"declaration": "public function is(string $tagName): bool"
},
{
"type": "method",
"args": [
{
"type": "arg",
"arg_types": [
"string"
],
"name": "attribute",
"declaration": "string $attribute"
}
],
"docblock": {
"type": "docblock",
"description": "",
"attribute": [
{
"type": "attribute",
"name": "alias",
"description": "for DOMDocument::hasAttribute();"
}
]
},
"modifiers": [
"public"
],
"name": "has",
"return_types": [
"bool"
],
"body": [],
"declaration": "public function has(string $attribute): bool"
},
{
"type": "method",
"args": [],
"docblock": {
"type": "docblock",
"description": "get an array of DOMAttrs on this node"
},
"modifiers": [
"public"
],
"name": "attributes",
"body": {
"_source": null,
"_type": "array"
},
"declaration": "public function attributes()"
},
{
"type": "method",
"args": [],
"docblock": {
"type": "docblock",
"description": "return an array of attributes ['attributeName'=>'value', ...];"
},
"modifiers": [
"public"
],
"name": "attributesAsArray",
"body": {
"_source": null,
"_type": "array"
},
"declaration": "public function attributesAsArray()"
},
{
"type": "method",
"args": [
{
"type": "arg",
"name": "name",
"declaration": "$name"
},
{
"type": "arg",
"name": "value",
"declaration": "$value"
}
],
"docblock": {
"type": "docblock",
"description": "Used for setting innerHTML like it's done in JavaScript:\n@code\n$div->innerHTML = '<h2>Chapter 2<\/h2><p>The story begins...<\/p>';\n@endcode"
},
"modifiers": [
"public"
],
"name": "__set",
"body": [],
"declaration": "public function __set($name, $value)"
},
{
"type": "method",
"args": [
{
"type": "arg",
"name": "name",
"declaration": "$name"
}
],
"docblock": {
"type": "docblock",
"description": "if the node has the named attribute, it will be removed. Otherwise, nothing happens"
},
"modifiers": [
"public"
],
"name": "__unset",
"body": [],
"declaration": "public function __unset($name)"
},
{
"type": "method",
"args": [
{
"type": "arg",
"name": "name",
"declaration": "$name"
}
],
"modifiers": [
"public"
],
"name": "__isset",
"body": [],
"declaration": "public function __isset($name)"
},
{
"type": "method",
"args": [
{
"type": "arg",
"name": "name",
"declaration": "$name"
}
],
"docblock": {
"type": "docblock",
"description": "Used for getting innerHTML like it's done in JavaScript:\n@code\n$string = $div->innerHTML;\n@endcode"
},
"modifiers": [
"public"
],
"name": "__get",
"body": [],
"declaration": "public function __get($name)"
},
{
"type": "method",
"args": [],
"modifiers": [
"public"
],
"name": "__toString",
"body": [],
"declaration": "public function __toString()"
},
{
"type": "method",
"args": [
{
"type": "arg",
"name": "xpath",
"declaration": "$xpath"
}
],
"modifiers": [
"public"
],
"name": "xpath",
"body": [],
"declaration": "public function xpath($xpath)"
},
{
"type": "method",
"args": [
{
"type": "arg",
"name": "inputName",
"declaration": "$inputName"
},
{
"type": "arg",
"name": "value",
"declaration": "$value"
}
],
"docblock": {
"type": "docblock",
"description": "Adds a hidden input to a form node\nIf a hidden input already exists with that name, do nothing\nIf a hidden input does not exist with that name, create and append it\n",
"attribute": [
{
"type": "attribute",
"name": "param",
"description": "mixed $key"
},
{
"type": "attribute",
"name": "param",
"description": "mixed $value"
},
{
"type": "attribute",
"name": "throws",
"description": "\\BadMethodCallException if this method is called on a non-form node"
},
{
"type": "attribute",
"name": "return",
"description": "void"
}
]
},
"modifiers": [
"public"
],
"name": "addHiddenInput",
"body": [],
"declaration": "public function addHiddenInput($inputName, $value)"
},
{
"type": "method",
"args": [
{
"type": "arg",
"name": "attributeName",
"declaration": "$attributeName"
}
],
"docblock": {
"type": "docblock",
"description": "Find out if this node has a true value for the given attribute name.\nLiterally just returns $this->hasAttribute($attributeName)\n\nI wanted to implement an attribute=\"false\" option... but that goes against the standards of HTML5, so that idea is on hold.\n\nSee https:\/\/stackoverflow.com\/questions\/4139786\/what-does-it-mean-in-html-5-when-an-attribute-is-a-boolean-attribute \n",
"attribute": [
{
"type": "attribute",
"name": "param",
"description": "mixed $attributeName The name of the attribute we're checking for."
},
{
"type": "attribute",
"name": "return",
"description": "bool"
}
]
},
"modifiers": [
"public"
],
"name": "boolAttribute",
"body": [],
"declaration": "public function boolAttribute($attributeName)"
},
{
"type": "method",
"args": [],
"modifiers": [
"public"
],
"name": "getInnerText",
"body": [],
"declaration": "public function getInnerText()"
},
{
"type": "method",
"args": [
{
"type": "arg",
"name": "method",
"declaration": "$method"
},
{
"type": "arg",
"name": "args",
"declaration": "$args"
}
],
"modifiers": [
"public"
],
"name": "__call",
"body": [],
"declaration": "public function __call($method, $args)"
}
]
}
]
}
}