I am fairly green under the arms here in PHP land. My background is mostly languages from the "Evil Empire". Picked up some simple code (I hope it is simple) that I am trying to leverage for a project here at work.
I do not understand what is going on here exactly, although I am sure that it is a call or refrence of some kind. The call looks like this:
$connector = SystemComponent::DB();
The function looks like this:
function &DB(){
static $dbConnect;
if (!isset($dbConnect)){
require_once('DbConnector.php');
$dbConnect = new DbConnector;
}
return $dbConnect;
}
What is the story behind the "&" in front of the function name and the "::" operator in the call? I tried to find these in the PHP documentation (I am sure they are there), but did not know what to search for.
Thanks in advance.
Brad