PHPackages                             sasin91/wow-emulator-communication - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sasin91/wow-emulator-communication

ActivePackage[API Development](/categories/api)

sasin91/wow-emulator-communication
==================================

Provides a fluent API for communication with WoW Emulators.

29PHP

Since Nov 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sasin91/wow-emulator-communication)[ Packagist](https://packagist.org/packages/sasin91/wow-emulator-communication)[ RSS](/packages/sasin91-wow-emulator-communication/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

World of Warcraft Emulator Communication (Laravel 5 Package)
============================================================

[](#world-of-warcraft-emulator-communication-laravel-5-package)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Remote API Communication package for WoW private servers

Contents
--------

[](#contents)

- [Installation](#installation)
- [Configuration](#configuration)
    - [Custom drivers](#custom-drivers)
        - [Driver traits](#driver-concerns)
    - [Communication pipes](#communication-pipes)
    - [Named Commands](#named-commands)
- [Usage](#usage)
    - [Facade](#facade)
    - [Manager](#driver-manager)
- [Testing](#testing)
- [Events](#events)
- [Issues](#issues)
- [License](#license)

Installation
------------

[](#installation)

For Laravel ~5
--------------

[](#for-laravel-5)

```
composer require sasin91/wow-emulator-communication

```

Add the following service provider in your `providers` array, in your `config/app.php`

```
\Sasin91\WoWEmulatorCommunication\EmulatorServiceProvider::class,

```

Configuration
-------------

[](#configuration)

To publish `emulator.php` config file, run the following, `vendor:publish` command.

```
php artisan vendor:publish --provider="\Sasin91\WoWEmulatorCommunication\EmulatorServiceProvider"
```

You may configure the config file to your liking, however the defaults should work for most cases.

If you would like to dispatch a command to multiple drivers, prefix a driver with `multiple` that returns an array of existing drivers.

### Custom drivers

[](#custom-drivers)

In addition to the config file, it is also possible to register your own drivers directly on the Manager, by the following syntax:

```
\Emulators::extend(string $class_name, \Closure $callback);
```

The $callback should return an implementation of `Sasin91\WoWEmulatorCommunication\Drivers\EmulatorCommunicationContract`.

In addition to providing your own implementation, you're also welcome to use the generic driver, like so:

```
\Emulators::extend('SkyFire', \Emulators::genericDriverCallback());
```

### Note: driver constructors should accept a string $name and array of $configurations as parameters.

[](#note-driver-constructors-should-accept-a-string-name-and-array-of-configurations-as-parameters)

\*\* There are no constructor dependency injection support implemented. \*\*

### Custom driver trait

[](#custom-driver-trait)

For your own implementation, there is some convenient traits available in the `Sasin91\WoWEmulatorCommunication\Drivers\Concerns` namespace:

```
* DispatchesDynamicCommands [allows for commands such as Emulator::accountOnlineList() or Emulator::account_online_list()]
* ExecutesCommands [Enables execution of Command(s)]
* HasConfigurations

```

Only ExecutesCommands is mandatory for the most parts. However without the HasConfigurations trait, the Contract would require you to implement your own `config($key = null, $default = null)` method.

Optionally, you can extend the default driver, `Sasin91\WoWEmulatorCommunication\Drivers\EmulatorCommunicationDriver` instead.

#### Communication Pipes

[](#communication-pipes)

Think of the pipes as a middleware layer that runs before a command is passed to the Handler.

The pipes receives the are plain PHP classes that should implement a public handle method, which receives Command object and a Closure representing the next slice of the stack.

```
public function handle($command, $next)
{
	// Your Logic

	return $next($command);
}

```

if you need inspiration, take a look at the existing Pipes in the `Sasin91\WoWEmulatorCommunication\Communication\Pipes` namespace.

For custom drivers, you should register pipes like any other driver, in the 'drivers' array in the `emulator.php` config file.

### Named commands

[](#named-commands)

Writing every command string manually can get a little bit tedious and error phrone. Enter named commands!

These commands, unlike the conventional commands will contain the command string themselves and only require the input parameters to be entered. In addition to the communication pipes, it is possible to leverage the Laravel Validator, by using `Sasin91\WoWEmulatorCommunication\Commands\Concerns\Validatable` and setting your rules(\[...\]).

As with the drivers, it is also possible to write your own named commands, a named command should implement the `Sasin91\WoWEmulatorCommunication\NamedEmulatorCommandContract` interface.

### Http Middleware

[](#http-middleware)

TODO
====

[](#todo)

As with any package, it's a good idea to refresh composer autoloader.

```
composer dump-autoload
```

**And you are ready to go.**

Usage
-----

[](#usage)

### Emulators Facade

[](#emulators-facade)

#### Dispatching a command to the default driver

[](#dispatching-a-command-to-the-default-driver)

```
\Emulators::command($command);
```

#### Dispatching a command a specific driver

[](#dispatching-a-command-a-specific-driver)

```
\Emulators::driver('driver')->command($command);
```

#### Dispatching a command to multiple drivers

[](#dispatching-a-command-to-multiple-drivers)

```
\Emulators::driver('multiple')->command($command);
```

In addition to the conventional driver method, it is also possible to call

```
\Emulators::emulator('driver')
```

instead. As an extra convenience, `dispatchTo($driver, $command)` is also available on the Facade.

$command can be an instance of `\Sasin91\WoWEmulatorCommunication\EmulatorCommand` or a string.

#### Facade tip

[](#facade-tip)

A little **nugget** with the Laravel Facades, is the ability to write and register your own.

This enables you to make driver specific Facades, for instance `App\Facades\TrinityCore`.

```
class TrinityCore extends \Illuminate\Support\Facades\Facade
{
    /**
     * Get the root object behind the facade.
     *
     * @return mixed
     */
    public static function getFacadeRoot()
    {
        return parent::getFacadeRoot()->driver('TrinityCore');
    }

    /**
     * Get the registered name of the component.
     *
     * @return string
     *
     * @throws \RuntimeException
     */
    protected static function getFacadeAccessor()
    {
        return 'Sasin91\WoWEmulatorCommunication\EmulatorManager';
    }
}
```

### Driver Manager

[](#driver-manager)

There isn't really that much to say about this, if you prefer depedency injection over service locator (ie. Facade), then injecting or resolving the `\Sasin91\WoWEmulatorCommunication\EmulatorManager` is also an option.

Testing
-------

[](#testing)

assertDispatched &amp; assertNotDispatched is available when using the fake.

```
    \Emulators::fake();

    // perform command

    \Emulators::assertDispatched(EmulatorCommand::class, function ($event) use ($command) {
        return (string)$event === (string)$command;
    });

    \Emulators::assertNotDispatched(EmulatorCommand::class);
```

Events
------

[](#events)

During the lifecycle of a Command,

the \[CommandCreating, CommandCreated, CommandFiring, CommandFired\] events, are expected to be fired.

However the creating &amp; created events are optional for custom commands, in the sense that they're expected to be manually fired.

A typical place would be in the constructor for these events.

Additionally, it is possible to disable the events complete, by calling `EmulatorCommand::unsetEventDispatcher()`. In the same sense, it is also possible to replace the dispatcher, by calling `EmulatorCommand::setEventDispatcher($dispatcher)`.

Issues
------

[](#issues)

If you discover any vulnerabilities, please e-mail them to me at .

For issues, open a issue on Github.

I'm currently aware of issues with proxy-driver-commands and testing.

License
-------

[](#license)

wow-emulator-communication is free software distributed under the terms of the MIT license.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/808722?v=4)[sasin91](/maintainers/Sasin91)[@sasin91](https://github.com/sasin91)

---

Top Contributors

[![sasin91](https://avatars.githubusercontent.com/u/808722?v=4)](https://github.com/sasin91 "sasin91 (29 commits)")

---

Tags

emulatorlaravel-5-packageprivate-serversoap-clientsocket-clientwow

### Embed Badge

![Health badge](/badges/sasin91-wow-emulator-communication/health.svg)

```
[![Health](https://phpackages.com/badges/sasin91-wow-emulator-communication/health.svg)](https://phpackages.com/packages/sasin91-wow-emulator-communication)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
