I have a PHP class that can contain an array of its own type this class has also a function called hatch()
when I call it for one of the array items it gives me a message you can't call the function. I call it like that
$this->arrayLikeThis[$i]->hatch();
however I made an outer function to hatch the object but I love to call it that way. I know that I can call any function of the the var_dump()
of the class is like that:
object(web\ui\structure\tag)#1 (4) {
["name"]=>
string(4) "meta"
["type"]=>
int(1)
["attributes"]=>
array(2) {
[0]=>
object(web\ui\structure\attribute)#2 (2) {
["attributeName"]=>
string(7) "content"
["attributeValue"]=>
string(24) "text/html; charset=utf-8"
}
[1]=>
object(web\ui\structure\attribute)#3 (2) {
["attributeName"]=>
string(10) "http-equiv"
["attributeValue"]=>
string(12) "Content-Type"
}
}
["childNodes"]=>
array(0) {
}
}