/** * Returns singleton instance of WebBotServer * * @return WebBotServer WebBotServer singleton */ public static function getInstance() { if (!self::$_instance) { self::$_instance = new self(); } return self::$_instance; }
/** * The constructor * * @param object $parent The calling object. * @param array $params Parameters for the __construct() */ public function __construct($parent, $params) { $this->id = uniqid(); $this->parent = $parent; $webbot = WebBotServer::getInstance(); }