Ejemplo n.º 1
0
 /**
  * Class for building server data.
  *
  * @param string|int $reference This can either be a string (server hash) or a numeric value (server id).
  */
 public function __construct($reference = null)
 {
     Authentication::__construct();
     parent::__construct();
     if (is_null($reference) && !isset($_COOKIE['pp_server_hash'])) {
         $reference = false;
     } else {
         if (is_null($reference)) {
             $reference = $_COOKIE['pp_server_hash'];
         }
     }
     if (is_numeric($reference)) {
         $this->_rebuildData($reference);
     } else {
         $this->_buildData($reference);
     }
 }