singleton - trying to initialise a static property on creation fails

后端 未结 2 1535
一向
一向 2021-01-26 13:15

I have a singleton class used to initialise error_handling.

The class as is takes a Zend_Config object and optional $appMode in parameter, to allow overriding the def

2条回答
  •  时光说笑
    2021-01-26 13:48

    You probably don't use any 5.3.x-Version of PHP. "Late Static Binding" (static::$_appMode) is not available in any version before. Use self::$_appMode instead. Its slightly different from static, but in your case it should be OK. For further info read Manual: Late Static Binding

提交回复
热议问题