Override PHP class to non readonly -
this question has answer here:
i working dom in php , context in need recursion , mess codes working fine.
i want keep codes clean abut readonly thing php not able proceed.
i trying like:
$test = new domelement('div'); $test->setattribute('class','blue');
but getting error
fatal error: uncaught exception 'domexception' message 'no modification allowed error'
i can setattribute element until append domdocument. there way it?
i thinking of like
class elem extends domelement { //and here maybe override readonly }
is possible?
i dont want create domdocument first use createelement() method , append them (i doing this), want create element , append them @ later time.
you can modify domelement
after adding domdocument
.
since class implemented in c code can't override method (even if willing re-implement whole method) since cannot access whatever internal structures c code accesses set attributes.
Comments
Post a Comment