- Messages
- 5,257
- Reaction score
- 97
- Points
- 48
So I'm like killing myself here.
I want to use __get, but while static. There is a _callStatic, but no __getStatic. Is there any way round this? Currently I'm using:
It doesn't look great
I don't want to be using a function, and I don't want to construct the class. Is there any way to do this?
~Callum
I want to use __get, but while static. There is a _callStatic, but no __getStatic. Is there any way round this? Currently I'm using:
PHP:
public static function get($name)
{
if(isset(self::$instances[$name]))
{
return self::$instances[$name];
}
return false;
}
It doesn't look great
I don't want to be using a function, and I don't want to construct the class. Is there any way to do this?
~Callum