Synapse\Synapse::getInstance PHP Method

getInstance() public static method

public static getInstance ( )
    public static function getInstance()
    {
        return self::$obj;
    }

Usage Example

Beispiel #1
0
 public function directDataPacket(DataPacket $packet, $needACK = false)
 {
     if ($packet instanceof PlayerListPacket) {
         $pk = new FastPlayerListPacket();
         $pk->sendTo = $this->uuid;
         $pk->type = $packet->type;
         foreach ($packet->entries as $entry) {
             if ($packet->type !== PlayerListPacket::TYPE_REMOVE) {
                 array_pop($entry);
                 array_pop($entry);
             }
             $pk->entries[] = $entry;
         }
         Synapse::getInstance()->sendDataPacket($pk);
         return;
     }
     $this->interface->putPacket($this, $packet, $needACK, true);
 }
All Usage Examples Of Synapse\Synapse::getInstance