extending tidy


Posted on 16th Feb 2014 07:03 pm by admin

I have problem with type-hinting and extending tidy. This code creates error:
Code: class cMyTidy extends tidy
{
public $tralala;
}
$oMyTidy = new cMyTidy();

doSomething($oMyTidy);

function doSomething(cMyTidy $oObject)
{
var_dump($oObject);
}
PHP Fatal error: Argument 1 passed to doSomething() must be an instance of cMyTidy......
If I change type-hinting in function from cMyTidy to tidy everything is OK.
Where is the problem?

No comments posted yet

Your Answer:

Login to answer
122 Like 41 Dislike
Previous forums Next forums
Other forums

Customizing message/behavior
Hi,I'm using the ASP.NET membership/authorization controls in my application. Some parts of my appli

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Tournament Brackets (Double Elimination)?
Is making a double elimination tournament style bracket system capable of being done in php?

DOMDocument
Hello All,

I need to take an XML document, modify some of the nodes in it and then perform a

close site for maintenance
i get a tutorial, saying the following code can put our site offline, and only the developer can vie

How to form a xml form table with a single sql statement..?
Hi everyone,
I don't know if this is going to be a duplicate thread but i couldn't

Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at th

Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co

Little problem with form insertion in MySQL, Please help!!!
Hi!,

I'm a little bit new with php and I have a little issue here. I created a webform to ins

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash