pradosoft / prado

Prado - Component Framework for PHP
Other
187 stars 70 forks source link

TComponent needs __callStatic to be behavior enabled #976

Closed belisoful closed 10 months ago

belisoful commented 1 year ago

TComponent::__callStatic could search the _um list of global behaviors for the static method (and each parent likewise).

belisoful commented 1 year ago

Dang. I found another PHPStan bug that impacts this enhancement.

https://github.com/phpstan/phpstan/issues/9465

belisoful commented 10 months ago

The way behaviors are implemented in PRADO allows for static calls to pre-attached behaviors that other platforms can't do. This is quite unique and should implemented for maximum potential. The new ISingleton also enables static calls to behaviors attached to a singleton as well.