[Solved] Error with resolution operator while referencing model type depending on dynamic variable (PHP 5.2)


I have found the answer here:

http://php.net/manual/en/language.oop5.paamayim-nekudotayim.php

The Scope Resolution Operator (also called Paamayim Nekudotayim) or in
simpler terms, the double colon, is a token that allows access to
static, constant, and overridden properties or methods of a class.

When referencing these items from outside the class definition, use
the name of the class.

As of PHP 5.3.0, it’s possible to reference the class using a
variable.
The variable’s value can not be a keyword (e.g. self, parent
and static).

Basically, I had to upgrade the PHP version to be able to reference a class dynamically.

solved Error with resolution operator while referencing model type depending on dynamic variable (PHP 5.2)