Re: Reflection to remove final
| From: | Jan Dolecek | Date: | Tue, 17 Jan 2012 13:15:18 +0000 |
| Subject: | Re: Reflection to remove final | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57397@lists.php.net to get a copy of this message | ||
Sebastian, thanks for the commit. But actually as I see the tests, I
may have not specified it enough:
ReflectionClass::setFinal(false) removes the final from the class, not
it's methods.
This test case
http://svn.php.net/viewvc/php/php-src/trunk/ext/reflection/tests/ReflectionClass_setFinal.phpt?view=markup&pathrev=322390
should have:
final class a { // class is final
public function b() { // method is not
...
}
}
Thanks
Jan Dolecek
juzna.cz@gmail.com
On Tue, Jan 17, 2012 at 12:28 PM, Sebastian Bergmann <sebastian@php.net> wrote:
> Am 17.01.2012 12:03, schrieb jpauli:
>> The patch just adds setFinal() to ReflectionClass.
>> What about ReflectionMethod?
>
> From the patch
>
> +/* {{{ proto public void ReflectionMethod::setFinal([bool isFinal = true])
> + Sets/unsets class as final */
> +ZEND_METHOD(reflection_method, setFinal)
>
> +/* {{{ proto public void ReflectionClass::setFinal([bool isFinal = true])
> + Sets/unsets class as final */
> +ZEND_METHOD(reflection_class, setFinal)
>
>
> TL;DR: All is well :)
>
> --
> Sebastian Bergmann Co-Founder and Principal Consultant
> http://sebastian-bergmann.de/
> http://thePHP.cc/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>