I guess this question is geared more towards the language-geeks. I have the following class:
<?php
abstract class ScopeFactory
{
public static function doStuff()
{
}
}
Now, I'm able to call this function, like so:
ScopeFactory::doStuff()
And this works happily. I've always coded under the impression that abstract
classes could not be used directly - and they have to be implemented by a concrete class in order to be callable.
My impression of static
is that it does not require an instance to be callable.
Could someone explain to me why this is legal, and if it should be? I'm curious about the finer details.