Re: Extending SplObjectStorage impossible due to type hints!?
| From: | Alexey Zakhlestin | Date: | Fri, 03 Apr 2009 10:33:03 +0000 |
| Subject: | Re: Extending SplObjectStorage impossible due to type hints!? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-43613@lists.php.net to get a copy of this message | ||
On Fri, Apr 3, 2009 at 2:05 PM, Karsten Dambekalns <karsten@typo3.org> wrote:
> Hi.
>
> I am trying to extend SplObjectStorage and override the attach() method.
> This gives me:
>
> Strict Standards: Declaration of B::attach() should be compatible with that
> of SplObjectStorage::attach() in test.php on line 5
>
> Seems am am hitting the object type hint wall again. Any ways around this,
> aside from disabling strict standard notices?
well, and what is the reason why you can't make your "attach()"
compatible with SplObjectStorage's?
the following signature works for me (both in 5.2 and 5.3):
public function attach($obj, $inf = null)
--
Alexey Zakhlestin
http://www.milkfarmsoft.com/