Hi.
With the recent BC with regard the locking of the constructor's
signature for subclasses, what is the expected mechanism for allowing
a subclass to have additional parameters?
You can always supply them and use func_get_args() / func_num_args() /
etc. to read them.
It would seem that the
Hi Richard!
Which change are you talking about? I just tried doing:
?php
class A { public function __construct($a) { } }
class B extends A { public function __construct($a, $b) { } }
And it worked on 5.4 Beta 1 without errors.
Nikita
On Sat, Sep 17, 2011 at 3:27 PM,
Hi,
I think Richards intended other methods often used in combination with
__construct:
class A { public function init($a, $b) { } }
class B extends A { public function init($a) { } }
= PHP Strict Standards: Declaration of B::init() should be compatible with
that of A::init()
The
maybe Richard referring to https://bugs.php.net/bug.php?id=55085 ?
but those change only affects the abstract classes.
Tyrael
On Sat, Sep 17, 2011 at 3:43 PM, Nikita Popov nikita@googlemail.com wrote:
Hi Richard!
Which change are you talking about? I just tried doing:
?php
class A
2011/9/17 de...@lucato.it:
Hi,
I think Richards intended other methods often used in combination with
__construct:
class A { public function init($a, $b) { } }
class B extends A { public function init($a) { } }
= PHP Strict Standards: Declaration of B::init() should be
Hi:
this is really a big bc break...(fatal error)
is there any reason for us to really change this? In Yaf, there
are a lot of Abstract classes, the subclass only need declared there
argument when they really need it.
and I really not think this change is good one, the Intenal class
can
On Sat, Sep 17, 2011 at 17:08, Laruence larue...@php.net wrote:
2011/9/17 de...@lucato.it:
Hi,
I think Richards intended other methods often used in combination with
__construct:
class A { public function init($a, $b) { } }
class B extends A { public function init($a) {
2011/9/17 Etienne Kneuss col...@php.net:
On Sat, Sep 17, 2011 at 17:08, Laruence larue...@php.net wrote:
2011/9/17 de...@lucato.it:
Hi,
I think Richards intended other methods often used in combination with
__construct:
class A { public function init($a, $b) { } }
On Sat, Sep 17, 2011 at 17:15, Laruence larue...@php.net wrote:
Hi:
this is really a big bc break...(fatal error)
is there any reason for us to really change this? In Yaf, there
are a lot of Abstract classes, the subclass only need declared there
argument when they really need it.
2011/9/17 Etienne Kneuss col...@php.net:
On Sat, Sep 17, 2011 at 17:15, Laruence larue...@php.net wrote:
Hi:
this is really a big bc break...(fatal error)
is there any reason for us to really change this? In Yaf, there
are a lot of Abstract classes, the subclass only need declared
do you know any reason for this?
The reason for this is simply that B must act like A since every B object is
also an object of A.
The reason for restricting the method signature in the Subclass is to
guarantee that an instance of a Subclass should work where an instance
of the Superclass
Hi!
On Sat, Sep 17, 2011 at 17:08, Laruencelarue...@php.net wrote:
class A { public function init($a, $b) { } }
class B extends A { public function init($a) { } }
= PHP Strict Standards: Declaration of B::init() should be compatible
with
that of A::init()
do you know any
Am 17.09.2011 20:08, schrieb Stas Malyshev:
Hi!
On Sat, Sep 17, 2011 at 17:08, Laruencelarue...@php.net wrote:
class A { public function init($a, $b) { } }
class B extends A { public function init($a) { } }
= PHP Strict Standards: Declaration of B::init() should be
Hi!
On 9/17/11 6:27 AM, Richard Quadling wrote:
With the recent BC with regard the locking of the constructor's
signature for subclasses, what is the expected mechanism for allowing
a subclass to have additional parameters?
I think the whole strict parameters thing has gone into somewhat
On Sat, Sep 17, 2011 at 20:08, Stas Malyshev smalys...@sugarcrm.com wrote:
Hi!
On Sat, Sep 17, 2011 at 17:08, Laruencelarue...@php.net wrote:
class A { public function init($a, $b) { } }
class B extends A { public function init($a) { } }
= PHP Strict Standards: Declaration
On 17 September 2011 15:52, Ferenc Kovacs tyr...@gmail.com wrote:
maybe Richard referring to https://bugs.php.net/bug.php?id=55085 ?
but those change only affects the abstract classes.
Tyrael
On Sat, Sep 17, 2011 at 3:43 PM, Nikita Popov nikita@googlemail.com
wrote:
Hi Richard!
On Sat, Sep 17, 2011 at 11:39 PM, Richard Quadling rquadl...@gmail.com wrote:
My question was due to the documentation commit
http://news.php.net/php.doc.cvs/8818 and
http://news.php.net/php.doc.cvs/8819.
Just to clarify (as I'm not sure you got that change right): PHP has
enforced signatures
Hi!
On 9/17/11 2:39 PM, Richard Quadling wrote:
An interface is the absolute here. Sub classes (the super class being
abstract or otherwise), should be able to define MORE parameters (with
or without default values). Otherwise they aren't extending, but
implementing - and for me that's the role
18 matches
Mail list logo