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

Probably Easy, Need help with Check Boxes in PHP Code
hello,

Thanks for looking this over and helping me out. My problem is I have a online store l

SuperCali PHP Event Calendar
does anyone have any experience with the SuperCali PHP Event Calendar? I could use some assistance

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

cyrillic string conversion question
Hello,

First time here...

I would like to know if there is a way to convert a

how to load a Sys file with system load and call images?
normally you need register the module as a service with CreateService, and start the service

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

Need a fuction to count entries in a field
Hi
I need a fuction to count how many times a email address is entered in to a field.

I ma

PHP page loading in Firefox but not in IE
hello,

i am currently doing a project in PHP and i have a problem. If I view the project in M

Notice Undefined index: reset/ Attempting to redirect, works, but get a notice
Full Header.php is:
Code: [Select]<?php
$reset= false;
$reset= strip_tags($_GET[&quo

How to limit the calls to an API
Hello, in my simple script I call an api which effectively involves me getting an xml file.

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