Dewald Botha
open source web thoughts
open source web thoughts
Feb 17th
so i finally took the time to write some code to better articulate my thoughts on ‘game theory pattern’.
/*
* Abstract Unifier class to select objects from different sources.
*/
abstract class childObjectUnifier
{
protected $currentObjectLocation;
public function __construct()
{
$this->currentObjectLocation = get_class($this);
}
public function getData()
{
switch ($this->currentObjectLocation)
{
case 'currentServerLoginObject':
return $this->currentServerLoginFunction();
break;
case 'remoteServerLoginObject':
return $this->remoteServerLoginFunction();
break;
default:
die('Current user load not available');
}
}
}
/*
* Login Object which exists on the current server.
* This object could still be hit on the current server if the current user load is not high.
* More >