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

HOW to get the bind variables list.
I've the following problem : I've some SQL queries stored in my DB as VARCHAR2 values.
I need t

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.

the followi

uploading video files into mysql in php
hi,
I have the video files which i have to upload into mysql db. along with creating thumbnails f

Why do I get this error
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a5488351/public_html/b

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...

Code: $define_li

problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm

Downloading file (Headers)
I'm trying to make users download a file, but they must wait 60 seconds before it begins.

But

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

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