Re: Required __construct call in SplFileObject
| From: | Paul Dragoonis | Date: | Wed, 05 Dec 2012 14:55:39 +0000 |
| Subject: | Re: Required __construct call in SplFileObject | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64159@lists.php.net to get a copy of this message | ||
You could put it either inside introduction or just below it, in the 'info'
style, just to inform people they must call parent::__construct() upon
instantiation of their object in order to use this.
On Wed, Dec 5, 2012 at 2:46 PM, Paul Dragoonis <dragoonis@gmail.com> wrote:
> The way this class is designed, it needs to take the file name via the
> constructor as an "initiation point".
>
> if you try to call a method of this class without initiation occurring it
> will throw an exception.
>
> this is why you must instantiate the SplFileObject's __construct() method
> to start the initiation.
>
> Hope this helps.
> Paul.
>
> On Wed, Dec 5, 2012 at 2:38 PM, Christoph Rosse <cr@okto.tv> wrote:
>
>> SplFileObject
>
>
>