PHP typehint specialization without actual method declaration
<p>I have the following piece of code all over the place:</p>

<pre><code>class Container extends Object implements \IteratorAggregate {

    public function AddObject(Object $object, $instanceKey) {
        ...
    }

    public function AddComponent(Component $component) {
        ...
    }
}

class MenuContainer extends Container {

    public function AddComponent(Menu $component) { // &lt;-- I'm redeclaring the method only because I need to change the typehint
        return parent::AddComponent($component);// I don't do anything useful here
    }

    public function AddObject(Menu $object, $instanceKey) { // &lt;-- I'm redeclaring the method only because I need to change the typehint
        return parent::AddObject($object, $instanceKey); // I don't do anything useful here
    }
}
</code></pre>

<p>I'm forced to do typehint specialization via method redeclaration because I want to prevent people that are using my code from doing mistake and accidentally adding something incompatible to my menu. So the question: Is there a way of doing typehint specialization without the actual method redeclaration?</p>
