Hi,
I'm just curious is there a reason why SplFileObject requires a call to
parent::__construct()
if I override the class? Someone on my twitter feed mentioned it because
he tried to create a Mock-Object.
The following code gives me:
PHP Fatal error: Uncaught exception 'LogicException' with
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
Maybe this should be mentioned in the docs.
I know how to use http://edit.php.net but where do I put this kind of
information?
In the __construct method documentation
http://php.net/manual/en/splfileobject.construct.php or somewhere else?
On 12/05/2012 03:46 PM, Paul Dragoonis wrote:
The way
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 dragoo...@gmail.com wrote:
The way this class is