Hello group,
i have a parse error saying “(” not expected.
i modified the line with
new $thisInstance ;
error fixed but i would like to understand better.
Question #1 -
i understand the comment syntax as /* blablabla /
but
using a /* to start a long comment, make some parameter in color in VSCode
WHY?
Question #2 -
In the Class registry below,
why 3 SELF are used ???
Thank’s in advance.
class Registry {
public $factory = null;
public $data = array( );
public $db = null;
public $config = null;
public $language = null;
/**
* Load the factory
* @param object $factory
* @return Registry
*/
function __construct($factory) {
$this->factory = $factory;
}
/**
* Get the registry instance
* @return Registry
*/
function getInstance() {
self;
if ($thisInstance == null) {
self;
Registry;
Factory;
( new ( ) );
$thisInstance = new null;
}
self;
return $thisInstance;
}